changeset 1806:8e17ceba3a40

.
author Nomad
date Mon, 07 Oct 2013 13:08:53 +0200
parents 830f196a69ea
children 6de366add757 bd899dfd976c
files OSWindow.cpp Render.cpp
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OSWindow.cpp	Mon Oct 07 13:00:53 2013 +0200
+++ b/OSWindow.cpp	Mon Oct 07 13:08:53 2013 +0200
@@ -346,7 +346,7 @@
         if ( !GetUpdateRect(api_handle, 0, 0) || !dword_4E98BC_bApplicationActive && !pRenderer->bWindowMode )
           return *result = 0, true;
       }
-      if (!api_handle)
+      if (!api_handle || !pRenderer)
         return false;
       PAINTSTRUCT Paint;
       BeginPaint(api_handle, &Paint);
--- a/Render.cpp	Mon Oct 07 13:00:53 2013 +0200
+++ b/Render.cpp	Mon Oct 07 13:08:53 2013 +0200
@@ -177,11 +177,13 @@
 }
 
 //----- (004A16A5) --------------------------------------------------------
-bool  AreRenderSurfacesOk()
+bool AreRenderSurfacesOk()
 {
   char v0; // zf@4
   bool result; // eax@8
 
+  if (!pRenderer)
+    return true;
   if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 )
   {
     if ( !pRenderer->pBackBuffer4 )