mirror of
https://github.com/UberGames/ioef.git
synced 2025-02-20 02:33:39 +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
|
@ -90,14 +90,14 @@ char *Sys_DefaultHomePath( void )
|
|||
FARPROC qSHGetFolderPath;
|
||||
HMODULE shfolder = LoadLibrary("shfolder.dll");
|
||||
|
||||
if(!*homePath && com_homepath)
|
||||
{
|
||||
if(shfolder == NULL)
|
||||
{
|
||||
Com_Printf("Unable to load SHFolder.dll\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(!*homePath && com_homepath)
|
||||
{
|
||||
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