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
This commit is contained in:
parent
0d1c5d91b8
commit
37c07bd99d
1 changed files with 4 additions and 5 deletions
|
@ -104,11 +104,10 @@ int SDL_X11_LoadSymbols(void)
|
||||||
#ifdef X11_DYNAMIC
|
#ifdef X11_DYNAMIC
|
||||||
x11_handle = SDL_LoadObject(x11_library);
|
x11_handle = SDL_LoadObject(x11_library);
|
||||||
x11ext_handle = SDL_LoadObject(x11ext_library);
|
x11ext_handle = SDL_LoadObject(x11ext_library);
|
||||||
if ((x11_handle != NULL) && (x11ext_handle != NULL)) {
|
rc = ((x11_handle != NULL) && (x11ext_handle != NULL));
|
||||||
#define SDL_X11_SYM(r,fn,arg) p##fn = X11_GetSym(#fn, &rc);
|
#define SDL_X11_SYM(r,fn,arg) p##fn = X11_GetSym(#fn, &rc);
|
||||||
#include "SDL_x11sym.h"
|
#include "SDL_x11sym.h"
|
||||||
#undef SDL_X11_SYM
|
#undef SDL_X11_SYM
|
||||||
}
|
|
||||||
|
|
||||||
if (!rc)
|
if (!rc)
|
||||||
SDL_X11_UnloadSymbols(); /* in case one of these loaded... */
|
SDL_X11_UnloadSymbols(); /* in case one of these loaded... */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue