Browse Source

get_library_path(): uninitialized hCurrentModuleInstance + make it static.

Kolan Sh 2 years ago
parent
commit
ad6da89892
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      templates/library_constructor.c.in

+ 2
- 2
templates/library_constructor.c.in View File

@@ -13,7 +13,7 @@
13 13
 #include "gettext-config.h"
14 14
 
15 15
 #if defined(_WIN32) || defined(_WIN64)
16
-  HINSTANCE hCurrentModuleInstance;
16
+  static HINSTANCE hCurrentModuleInstance;
17 17
 #endif
18 18
 
19 19
 @LC_GLOB_VARS@
@@ -42,8 +42,8 @@ void __attribute__ ((constructor)) load_library (void)
42 42
 
43 43
   gchar *so_path = g_new (gchar, FILENAME_MAX);
44 44
 #if defined(_WIN32) || defined(_WIN64)
45
-  get_library_path (so_path, NULL);
46 45
   hCurrentModuleInstance = hInstance;
46
+  get_library_path (so_path, NULL);
47 47
   @LC_WIN32_CODE@
48 48
 #elif defined(linux) || defined(UNIX) || defined(__unix__)
49 49
   get_library_path (so_path, load_library);

Loading…
Cancel
Save