clear window workmask when queuing up window for destruction. All callbacks (except destroy) are removed from the window already anyway. This fixes a problem where a newly created window that is immediately destroyed again causes an error-exit because it is still being inited and at that point it is found that no display callback has been set, which is an error.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1837 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2017-10-23 19:01:09 +00:00
parent 173c394399
commit d1adda4783

View File

@ -182,6 +182,11 @@ void fgAddToWindowDestroyList( SFG_Window* window )
fghClearCallBacks( window ); fghClearCallBacks( window );
SET_WCB( *window, Destroy, destroy, destroyData ); SET_WCB( *window, Destroy, destroy, destroyData );
} }
/*
* Similarly, clear all work set for the window, none of this has to be executed anymore
*/
window->State.WorkMask = 0;
} }
/* /*