X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=freeglut-1.3%2Ffreeglut_structure.c;h=2c262590ef9e69336c54da9196789ef20011253b;hb=9d66916bab11e22ff2b670638be3a50e604897a1;hp=335168aad1ecd27a2a928de2de9a24bc83adbf84;hpb=583baa8756a71ed088b8e46c52a945218037314c;p=freeglut diff --git a/freeglut-1.3/freeglut_structure.c b/freeglut-1.3/freeglut_structure.c index 335168a..2c26259 100644 --- a/freeglut-1.3/freeglut_structure.c +++ b/freeglut-1.3/freeglut_structure.c @@ -254,7 +254,12 @@ void fgDestroyWindow( SFG_Window* window, GLboolean needToClose ) * If the programmer defined a destroy callback, call it */ if ( window->Callbacks.Destroy != NULL ) + { + SFG_Window *activeWindow = fgStructure.Window ; + fgStructure.Window = window ; window->Callbacks.Destroy () ; + fgStructure.Window = activeWindow ; + } /* * Now we should remove the reference to this window from its parent