1.1 --- a/src/video/windows/SDL_windowsframebuffer.c Sat Jan 07 22:34:51 2012 -0500
1.2 +++ b/src/video/windows/SDL_windowsframebuffer.c Sat Jan 07 22:52:41 2012 -0500
1.3 @@ -113,6 +113,11 @@
1.4 {
1.5 SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
1.6
1.7 + if (!data) {
1.8 + /* The window wasn't fully initialized */
1.9 + return;
1.10 + }
1.11 +
1.12 if (data->mdc) {
1.13 DeleteDC(data->mdc);
1.14 data->mdc = NULL;
2.1 --- a/src/video/x11/SDL_x11framebuffer.c Sat Jan 07 22:34:51 2012 -0500
2.2 +++ b/src/video/x11/SDL_x11framebuffer.c Sat Jan 07 22:52:41 2012 -0500
2.3 @@ -193,7 +193,14 @@
2.4 X11_DestroyWindowFramebuffer(_THIS, SDL_Window * window)
2.5 {
2.6 SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
2.7 - Display *display = data->videodata->display;
2.8 + Display *display;
2.9 +
2.10 + if (!data) {
2.11 + /* The window wasn't fully initialized */
2.12 + return;
2.13 + }
2.14 +
2.15 + display = data->videodata->display;
2.16
2.17 if (data->ximage) {
2.18 XDestroyImage(data->ximage);