Commit 8b6af614 authored by Erik Reider's avatar Erik Reider

Fixed reloading the config sometimes segfauling

Caused by "app.config_reload" in the control center. Changing a value, reloading, and then chaning it again and reloading -> segfault
parent fd7896e5
......@@ -300,8 +300,6 @@ namespace SwayNotificationCenter {
#endif
public class ConfigModel : Object, Json.Serializable {
private static ConfigModel ? previous_config = null;
private static ConfigModel ? _instance = null;
private static string _path = "";
......@@ -352,7 +350,8 @@ namespace SwayNotificationCenter {
critical (e.message);
m = new ConfigModel ();
}
previous_config = _instance;
ConfigModel ? previous_config = _instance;
_instance = m;
_path = path;
......
......@@ -15,8 +15,7 @@ namespace SwayNotificationCenter {
static bool activated = false;
public signal void config_reload (
owned ConfigModel ? old_config, ConfigModel new_config);
public signal void config_reload (ConfigModel ? old_config, ConfigModel new_config);
public Swaync () {
Object (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment