changeset 1805:830f196a69ea

WinXP fix
author Nomad
date Mon, 07 Oct 2013 13:00:53 +0200
parents 92ab1b3cc95a
children 8e17ceba3a40 f6d6ed1c9911
files .hgignore OSWindow.cpp
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Mon Oct 07 11:59:51 2013 +0200
+++ b/.hgignore	Mon Oct 07 13:00:53 2013 +0200
@@ -0,0 +1,4 @@
+syntax: glob
+Debug/
+Release/
+*.orig
--- a/OSWindow.cpp	Mon Oct 07 11:59:51 2013 +0200
+++ b/OSWindow.cpp	Mon Oct 07 13:00:53 2013 +0200
@@ -341,8 +341,13 @@
       return false;
 
     case WM_PAINT:
-      if ( !GetUpdateRect(api_handle, 0, 0) || !dword_4E98BC_bApplicationActive && !pRenderer->bWindowMode )
-        return *result = 0, true;
+      if (pRenderer)
+      {
+        if ( !GetUpdateRect(api_handle, 0, 0) || !dword_4E98BC_bApplicationActive && !pRenderer->bWindowMode )
+          return *result = 0, true;
+      }
+      if (!api_handle)
+        return false;
       PAINTSTRUCT Paint;
       BeginPaint(api_handle, &Paint);
       if ( pArcomageGame->bGameInProgress )