From 93327cb618dc11af9729178b7cbd17776be1e5b4 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 27 Aug 2003 22:50:39 +0000 Subject: [PATCH] try to fix segfault caused by VID_Shutdown getting called before VID_Init (error conditions). --- libs/video/targets/vid_glx.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libs/video/targets/vid_glx.c b/libs/video/targets/vid_glx.c index 60b333d95..3d44a5a3c 100644 --- a/libs/video/targets/vid_glx.c +++ b/libs/video/targets/vid_glx.c @@ -144,13 +144,11 @@ QFGL_LoadLibrary (void) void VID_Shutdown (void) { - if (!vid.initialized) - return; - Con_Printf ("VID_Shutdown\n"); - - X11_RestoreVidMode (); - X11_CloseDisplay (); + if (x_disp) { + X11_RestoreVidMode (); + X11_CloseDisplay (); + } } static void