From e42300806eff01237cd9cfce805a9145bc54227f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 9 Apr 2002 23:32:40 +0000 Subject: [PATCH] Fixed a crash bug in the WM_ACTIVATE code (thanks John!) --- src/video/wincommon/SDL_sysevents.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/wincommon/SDL_sysevents.c b/src/video/wincommon/SDL_sysevents.c index 459817bab..b2b30350d 100644 --- a/src/video/wincommon/SDL_sysevents.c +++ b/src/video/wincommon/SDL_sysevents.c @@ -190,6 +190,10 @@ LONG CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) BOOL minimized; Uint8 appstate; + if ( ! this->screen ) { + /* What do we do when we get the screen? */ + return(0); + } minimized = HIWORD(wParam); if ( !minimized && (LOWORD(wParam) != WA_INACTIVE) ) { /* Gain the following states */