summaryrefslogtreecommitdiff
path: root/plugins/modelines
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-03-27 15:32:25 +0300
committermonsta <[email protected]>2017-03-27 15:32:25 +0300
commit910aec06b34eed2aacbdf4f138f1ba38605c249a (patch)
tree57c77f82707a5ad2d5b3b0c9f34683eab3d5ba5a /plugins/modelines
parent7ecdec41ff3ec2661c16006ea40ab9336c06797f (diff)
downloadpluma-910aec06b34eed2aacbdf4f138f1ba38605c249a.tar.bz2
pluma-910aec06b34eed2aacbdf4f138f1ba38605c249a.tar.xz
modelines: fix random crash on closing one of several Pluma windows
ported from: https://git.gnome.org/browse/gedit/commit/?id=b8b6fe708eddd6a9d471ecd04c38e790d8c0bc7c
Diffstat (limited to 'plugins/modelines')
-rw-r--r--plugins/modelines/modeline-parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/modelines/modeline-parser.c b/plugins/modelines/modeline-parser.c
index f816f957..c66c1ed5 100644
--- a/plugins/modelines/modeline-parser.c
+++ b/plugins/modelines/modeline-parser.c
@@ -79,7 +79,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
@@ -99,6 +100,7 @@ modeline_parser_shutdown ()
kate_languages = NULL;
g_free (modelines_data_dir);
+ modelines_data_dir = NULL;
}
static GHashTable *