Fix crash on missing level background
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Wed, 25 May 2011 16:45:51 +0000 (16:45 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Wed, 25 May 2011 16:45:51 +0000 (16:45 +0000)
git-svn-id: https://s.snth.net/svn/neverball/branches/gles@3579 78b8d119-cf0a-0410-b17c-f493084dd1d7

share/solid_draw.c

index 36bd543..bc36334 100644 (file)
@@ -816,6 +816,9 @@ void sol_back(const struct s_draw *draw,
               struct s_rend *rend,
               float n, float f, float t)
 {
+    if (!draw || !draw->base)
+        return;
+
     glDisable(GL_LIGHTING);
     glDepthMask(GL_FALSE);