From 8ee594fb3225525539bd6d325638bfa3e1bd9439 Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 12 Apr 2011 04:53:57 +0000 Subject: [PATCH] fix an engine crash in vid_glx git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11051 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=55e7612699b19253bb0dff70074e09dae5acdbb5 --- vid_glx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vid_glx.c b/vid_glx.c index ca0462d1..358ab187 100644 --- 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); -- 2.39.2