From ad6da89892ff89ff4ecb19725c38c87792c41dc5 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Sat, 16 Jul 2016 00:57:43 +0300 Subject: [PATCH] get_library_path(): uninitialized hCurrentModuleInstance + make it static. --- templates/library_constructor.c.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/library_constructor.c.in b/templates/library_constructor.c.in index 96868b1..fb408e4 100644 --- a/templates/library_constructor.c.in +++ b/templates/library_constructor.c.in @@ -13,7 +13,7 @@ #include "gettext-config.h" #if defined(_WIN32) || defined(_WIN64) - HINSTANCE hCurrentModuleInstance; + static HINSTANCE hCurrentModuleInstance; #endif @LC_GLOB_VARS@ @@ -42,8 +42,8 @@ void __attribute__ ((constructor)) load_library (void) gchar *so_path = g_new (gchar, FILENAME_MAX); #if defined(_WIN32) || defined(_WIN64) - get_library_path (so_path, NULL); hCurrentModuleInstance = hInstance; + get_library_path (so_path, NULL); @LC_WIN32_CODE@ #elif defined(linux) || defined(UNIX) || defined(__unix__) get_library_path (so_path, load_library);