mirror of
https://github.com/UberGames/ioef.git
synced 2025-02-17 09:22:03 +00:00
Fix shfolder.dll not getting freed
This commit is contained in:
parent
0f62a565f9
commit
230af8c9e9
1 changed files with 8 additions and 9 deletions
|
@ -89,15 +89,15 @@ char *Sys_DefaultHomePath( void )
|
|||
TCHAR szPath[MAX_PATH];
|
||||
FARPROC qSHGetFolderPath;
|
||||
HMODULE shfolder = LoadLibrary("shfolder.dll");
|
||||
|
||||
|
||||
if(shfolder == NULL)
|
||||
{
|
||||
Com_Printf("Unable to load SHFolder.dll\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(!*homePath && com_homepath)
|
||||
{
|
||||
if(shfolder == NULL)
|
||||
{
|
||||
Com_Printf("Unable to load SHFolder.dll\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
qSHGetFolderPath = GetProcAddress(shfolder, "SHGetFolderPathA");
|
||||
if(qSHGetFolderPath == NULL)
|
||||
{
|
||||
|
@ -120,10 +120,9 @@ char *Sys_DefaultHomePath( void )
|
|||
Q_strcat(homePath, sizeof(homePath), com_homepath->string);
|
||||
else
|
||||
Q_strcat(homePath, sizeof(homePath), HOMEPATH_NAME_WIN);
|
||||
|
||||
FreeLibrary(shfolder);
|
||||
}
|
||||
|
||||
FreeLibrary(shfolder);
|
||||
return homePath;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue