Commit 37c07bd9 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Fixed crash when dynamic X11 fails to load system Xlib libraries at runtime.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401174
parent 0d1c5d91
......@@ -104,11 +104,10 @@ int SDL_X11_LoadSymbols(void)
#ifdef X11_DYNAMIC
x11_handle = SDL_LoadObject(x11_library);
x11ext_handle = SDL_LoadObject(x11ext_library);
if ((x11_handle != NULL) && (x11ext_handle != NULL)) {
#define SDL_X11_SYM(r,fn,arg) p##fn = X11_GetSym(#fn, &rc);
#include "SDL_x11sym.h"
#undef SDL_X11_SYM
}
rc = ((x11_handle != NULL) && (x11ext_handle != NULL));
#define SDL_X11_SYM(r,fn,arg) p##fn = X11_GetSym(#fn, &rc);
#include "SDL_x11sym.h"
#undef SDL_X11_SYM
if (!rc)
SDL_X11_UnloadSymbols(); /* in case one of these loaded... */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment