# HG changeset patch # User Sam Lantinga # Date 1264362437 0 # Node ID b0a707f589a66798caa94c039fea9d77eadd83db # Parent d3f330fc2009d090abf605f05212faf57eb52b99 Fixed bug #916 Shutting down the video shuts down the event loop, so don't do that after starting the event loop. :) diff -r d3f330fc2009 -r b0a707f589a6 src/video/SDL_video.c --- a/src/video/SDL_video.c Fri Jan 22 16:17:11 2010 +0000 +++ b/src/video/SDL_video.c Sun Jan 24 19:47:17 2010 +0000 @@ -163,6 +163,11 @@ int index; int i; + /* Check to make sure we don't overwrite '_this' */ + if (_this != NULL) { + SDL_VideoQuit(); + } + /* Toggle the event thread flags, based on OS requirements */ #if defined(MUST_THREAD_EVENTS) flags |= SDL_INIT_EVENTTHREAD; @@ -177,10 +182,7 @@ if (SDL_StartEventLoop(flags) < 0) { return -1; } - /* Check to make sure we don't overwrite '_this' */ - if (_this != NULL) { - SDL_VideoQuit(); - } + /* Select the proper video driver */ index = 0; video = NULL;