[Scummvm-cvs-logs] CVS: residual scene.h,1.4,1.5

James Brown ender at users.sourceforge.net
Mon Aug 18 07:21:03 CEST 2003


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1:/tmp/cvs-serv430

Modified Files:
	scene.h 
Log Message:
Some sets (eg, tr) cannot find their room backgrounds?!? Error a little more gracefully than a null-access segfault


Index: scene.h
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- scene.h	17 Aug 2003 08:30:18 -0000	1.4
+++ scene.h	18 Aug 2003 14:13:09 -0000	1.5
@@ -21,6 +21,7 @@
 #include "vector3d.h"
 #include "bitmap.h"
 #include "color.h"
+#include "debug.h"
 #include <SDL.h>
 #include <SDL_opengl.h>
 #include <string>
@@ -36,11 +37,13 @@
   ~Scene();
 
   void drawBackground() const {
+    if (currSetup_->bkgnd_zbm_ == NULL) {
+      error("Null background for setup %s in %s", currSetup_->name_.c_str(), name_.c_str());
+      return;
+    }
     glEnable(GL_DEPTH_TEST);
-    //    if (currSetup_->bkgnd_zbm_ != NULL)
-    //      currSetup_->bkgnd_zbm_->draw();
     glDepthMask(GL_FALSE);
-    currSetup_->bkgnd_bm_->draw();
+    currSetup_->bkgnd_zbm_->draw();
     glDepthMask(GL_TRUE);
   }
   void setupCamera() {





More information about the Scummvm-git-logs mailing list