mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 17:08:53 +02:00
Don't store address of local variable in hashtable.
2001-02-10 Tor Lillqvist <tml@iki.fi> * gwin32.c (get_package_directory_from_module): Don't store address of local variable in hashtable.
This commit is contained in:
committed by
Tor Lillqvist
parent
41de921c50
commit
bf8cdc4655
5
gwin32.c
5
gwin32.c
@@ -850,7 +850,7 @@ get_package_directory_from_module (gchar *module_name)
|
||||
{
|
||||
static GHashTable *module_dirs = NULL;
|
||||
HMODULE hmodule = NULL;
|
||||
gchar fn[MAX_PATH];
|
||||
gchar *fn;
|
||||
gchar *p;
|
||||
gchar *result;
|
||||
|
||||
@@ -869,7 +869,8 @@ get_package_directory_from_module (gchar *module_name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!GetModuleFileName (hmodule, fn, sizeof (fn)))
|
||||
fn = g_malloc (MAX_PATH);
|
||||
if (!GetModuleFileName (hmodule, fn, MAX_PATH))
|
||||
return NULL;
|
||||
|
||||
if ((p = strrchr (fn, '\\')) != NULL)
|
||||
|
Reference in New Issue
Block a user