Fix dllHandle possibly being uninitialized in Sys_LoadDll
This commit is contained in:
parent
c259e7cba3
commit
bc2f45508d
1 changed files with 5 additions and 2 deletions
|
@ -498,7 +498,7 @@ from executable path, then fs_basepath.
|
||||||
|
|
||||||
void *Sys_LoadDll(const char *name, qboolean useSystemLib)
|
void *Sys_LoadDll(const char *name, qboolean useSystemLib)
|
||||||
{
|
{
|
||||||
void *dllhandle;
|
void *dllhandle = NULL;
|
||||||
|
|
||||||
if(!Sys_DllExtension(name))
|
if(!Sys_DllExtension(name))
|
||||||
{
|
{
|
||||||
|
@ -507,9 +507,12 @@ void *Sys_LoadDll(const char *name, qboolean useSystemLib)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(useSystemLib)
|
if(useSystemLib)
|
||||||
|
{
|
||||||
Com_Printf("Trying to load \"%s\"...\n", name);
|
Com_Printf("Trying to load \"%s\"...\n", name);
|
||||||
|
dllhandle = Sys_LoadLibrary(name);
|
||||||
|
}
|
||||||
|
|
||||||
if(!useSystemLib || !(dllhandle = Sys_LoadLibrary(name)))
|
if(!dllhandle)
|
||||||
{
|
{
|
||||||
const char *topDir;
|
const char *topDir;
|
||||||
char libPath[MAX_OSPATH];
|
char libPath[MAX_OSPATH];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue