28 lines
884 B
Diff
28 lines
884 B
Diff
From b0b2fd09f4b58fef8f189c1f09cc8857723b123c Mon Sep 17 00:00:00 2001
|
|
From: Janne Junnila <janne.junnila@gmail.com>
|
|
Date: Sun, 7 Jul 2019 10:06:07 +0200
|
|
Subject: [PATCH 3/3] Fix a segfault when trying to free an environment
|
|
variable.
|
|
|
|
---
|
|
src/GUI/editor_pane.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git src/GUI/editor_pane.c src/GUI/editor_pane.c
|
|
index 090b80f..9332972 100644
|
|
--- src/GUI/editor_pane.c
|
|
+++ src/GUI/editor_pane.c
|
|
@@ -266,6 +266,9 @@ editor_pane_new (void *synthesizer, GtkAdjustment **adjustments, gboolean is_plu
|
|
gchar *skin_path = (gchar *)g_getenv ("AMSYNTH_SKIN");
|
|
if (skin_path == NULL) {
|
|
skin_path = g_build_filename (PKGDATADIR, "skins", "default", NULL);
|
|
+ } else {
|
|
+ // Copy the env var so that we don't segfault at free below
|
|
+ skin_path = g_strdup (skin_path);
|
|
}
|
|
|
|
if (!g_file_test (skin_path, G_FILE_TEST_EXISTS)) {
|
|
--
|
|
2.24.0
|
|
|