mirror of
https://github.com/encounter/SDL.git
synced 2025-12-18 09:25:29 +00:00
SDL_LoadObject (windows, os/2): prevent crash if dll name is NULL.
This commit is contained in:
@@ -32,7 +32,15 @@
|
||||
void *
|
||||
SDL_LoadObject(const char *sofile)
|
||||
{
|
||||
LPTSTR tstr = WIN_UTF8ToString(sofile);
|
||||
LPTSTR tstr;
|
||||
|
||||
if (!sofile) {
|
||||
SDL_SetError("NULL sofile");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
tstr = WIN_UTF8ToString(sofile);
|
||||
|
||||
#ifdef __WINRT__
|
||||
/* WinRT only publically supports LoadPackagedLibrary() for loading .dll
|
||||
files. LoadLibrary() is a private API, and not available for apps
|
||||
|
||||
Reference in New Issue
Block a user