]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix an engine crash in vid_glx
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 12 Apr 2011 04:53:57 +0000 (04:53 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 12 Apr 2011 04:50:55 +0000 (06:50 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11051 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=55e7612699b19253bb0dff70074e09dae5acdbb5

vid_glx.c

index ca0462d1309f613948974d61f2b61161e3b84446..358ab18794aed37258aad33681d6e3ae5e9257cd 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -89,8 +89,8 @@ static Window win, root;
 static GLXContext ctx = NULL;
 static GC vidx11_gc = NULL;
 static XImage *vidx11_ximage[2] = { NULL, NULL };
-static int vidx11_ximage_pos;
-static XShmSegmentInfo vidx11_shminfo[2];
+static int vidx11_ximage_pos = 0;
+static XShmSegmentInfo vidx11_shminfo[2] = { -1, -1 };
 static int vidx11_shmevent = -1;
 static int vidx11_shmwait = 0; // number of frames outstanding
 
@@ -849,6 +849,7 @@ void VID_Shutdown(void)
 
        if (vid.softdepthpixels)
                free(vid.softdepthpixels);
+       vid.softdepthpixels = NULL;
 
        if (win)
                XDestroyWindow(vidx11_display, win);