From 0a2e158e737121ba4906a687c13214e4b090bd08 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 22 Oct 2006 17:12:39 +0000 Subject: Catch failure to initialise video when calling SDL_Init. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 709 --- src/i_video.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i_video.c b/src/i_video.c index 02b0b62e..c45d3640 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -1034,7 +1034,10 @@ void I_InitGraphics(void) SDL_Event dummy; int flags = 0; - SDL_Init(SDL_INIT_VIDEO); + if (SDL_Init(SDL_INIT_VIDEO) < 0) + { + I_Error("Failed to initialise video: %s", SDL_GetError()); + } // Check for command-line video-related parameters. -- cgit v1.2.3