diff options
author | Simon Howard | 2005-07-23 17:27:04 +0000 |
---|---|---|
committer | Simon Howard | 2005-07-23 17:27:04 +0000 |
commit | ec8ab9e6a3fbcdc57a42cc7bd61b944f589da597 (patch) | |
tree | 081bda4d363f72236a1db911d63263c5bad1bfb5 | |
parent | 54eadca987f07550997b558e24b1c761c75f444b (diff) | |
download | chocolate-doom-ec8ab9e6a3fbcdc57a42cc7bd61b944f589da597.tar.gz chocolate-doom-ec8ab9e6a3fbcdc57a42cc7bd61b944f589da597.tar.bz2 chocolate-doom-ec8ab9e6a3fbcdc57a42cc7bd61b944f589da597.zip |
Stop crash on shutdown
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 13
-rw-r--r-- | src/i_video.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/i_video.c b/src/i_video.c index d17f44cf..a4a9c617 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: i_video.c 8 2005-07-23 16:44:57Z fraggle $ +// $Id: i_video.c 13 2005-07-23 17:27:04Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -22,6 +22,9 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.3 2005/07/23 17:27:04 fraggle +// Stop crash on shutdown +// // Revision 1.2 2005/07/23 16:44:55 fraggle // Update copyright to GNU GPL // @@ -35,7 +38,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: i_video.c 8 2005-07-23 16:44:57Z fraggle $"; +rcsid[] = "$Id: i_video.c 13 2005-07-23 17:27:04Z fraggle $"; #include <stdlib.h> #include <unistd.h> @@ -59,7 +62,6 @@ int XShmGetEventBase( Display* dpy ); // problems with g++? #include <sys/socket.h> #include <netinet/in.h> -#include <errnos.h> #include <signal.h> #include "doomstat.h" @@ -185,7 +187,9 @@ void I_ShutdownGraphics(void) shmctl(X_shminfo.shmid, IPC_RMID, 0); // Paranoia. - image->data = NULL; + if (image) { + image->data = NULL; + } } |