From: Diederick Niehorster Date: Thu, 17 Jan 2013 14:51:25 +0000 (+0000) Subject: fixed closing window crash, thanks Philipp! X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=757e1ba2f548e903b960b19a39c3752a3be621f7;hp=0806929651a691f0aeb9886f8ea1b1901ec3093e;p=freeglut fixed closing window crash, thanks Philipp! git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1495 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/x11/fg_main_x11.c b/src/x11/fg_main_x11.c index c77f5e4..8387ba8 100644 --- a/src/x11/fg_main_x11.c +++ b/src/x11/fg_main_x11.c @@ -628,10 +628,11 @@ void fgPlatformProcessSingleEvent ( void ) switch( event.type ) { case ClientMessage: - if(fgIsSpaceballXEvent(&event)) { - fgSpaceballHandleXEvent(&event); - break; - } + if (fgStructure.CurrentWindow) + if(fgIsSpaceballXEvent(&event)) { + fgSpaceballHandleXEvent(&event); + break; + } /* Destroy the window when the WM_DELETE_WINDOW message arrives */ if( (Atom) event.xclient.data.l[ 0 ] == fgDisplay.pDisplay.DeleteWindow ) {