[gtranslator] Dup gtr_locale_dir string
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Dup gtr_locale_dir string
- Date: Tue, 11 Jun 2019 08:26:55 +0000 (UTC)
commit dffed68eb36d1c2c0ac6031151c692e5e0dc976f
Author: Daniel GarcĂa Moreno <dani danigm net>
Date: Tue Jun 11 10:05:17 2019 +0200
Dup gtr_locale_dir string
The gtr_locale_dir is freed on shutdown, we can't free an static
char*, so a g_strdup is a good idea in this case.
src/gtr-dirs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gtr-dirs.c b/src/gtr-dirs.c
index 300ca4aa..8ce4e8c7 100644
--- a/src/gtr-dirs.c
+++ b/src/gtr-dirs.c
@@ -78,7 +78,7 @@ gtr_dirs_init ()
{
gtr_data_dir = g_build_filename (PACKAGE_DATADIR, "gtranslator", NULL);
gtr_help_dir = g_build_filename (PACKAGE_DATADIR, "help", NULL);
- gtr_locale_dir = PACKAGE_LOCALEDIR;
+ gtr_locale_dir = g_strdup (PACKAGE_LOCALEDIR);
gtr_lib_dir = g_build_filename (PACKAGE_LIBDIR, "gtranslator", NULL);
}
#endif /* !G_OS_WIN32 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]