diff options
author | monsta <[email protected]> | 2017-03-27 15:32:25 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2017-03-30 17:36:47 +0300 |
commit | 0fd147543d2af1c285393daa92f87070926166d6 (patch) | |
tree | c6fe2187bda9eb45530f2866bd6e794f00915f98 | |
parent | 23dc50f25a988f08822c986e88740cf278bba452 (diff) | |
download | pluma-0fd147543d2af1c285393daa92f87070926166d6.tar.bz2 pluma-0fd147543d2af1c285393daa92f87070926166d6.tar.xz |
modelines: fix random crash on closing one of several Pluma windows
ported from:
https://git.gnome.org/browse/gedit/commit/?id=b8b6fe708eddd6a9d471ecd04c38e790d8c0bc7c
-rw-r--r-- | plugins/modelines/modeline-parser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/modelines/modeline-parser.c b/plugins/modelines/modeline-parser.c index c1d96140..0ab477e7 100644 --- a/plugins/modelines/modeline-parser.c +++ b/plugins/modelines/modeline-parser.c @@ -82,7 +82,8 @@ has_option (ModelineOptions *options, void modeline_parser_init (const gchar *data_dir) { - modelines_data_dir = g_strdup (data_dir); + if (modelines_data_dir == NULL) + modelines_data_dir = g_strdup (data_dir); } void @@ -102,6 +103,7 @@ modeline_parser_shutdown () kate_languages = NULL; g_free (modelines_data_dir); + modelines_data_dir = NULL; } static GHashTable * |