From: divverent Date: Tue, 12 Apr 2011 04:53:57 +0000 (+0000) Subject: fix an engine crash in vid_glx X-Git-Tag: xonotic-v0.6.0~163^2~495 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=55e7612699b19253bb0dff70074e09dae5acdbb5;p=xonotic%2Fdarkplaces.git fix an engine crash in vid_glx git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11051 d7cf8633-e32d-0410-b094-e92efae38249 --- 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);