summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/profiles.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/config/profiles.c b/src/config/profiles.c
index 021df5e..8a75401 100644
--- a/src/config/profiles.c
+++ b/src/config/profiles.c
@@ -139,9 +139,11 @@ changed(GFileMonitor G_GNUC_UNUSED *monitor, GFile G_GNUC_UNUSED *file,
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" /* False positive */
if (!g_key_file_has_group(profiles->key_file,
profiles->current)) {
- insert(profiles, profiles->current,
- cur_name, cur_color);
- mq_profiles_save(profiles);
+ if (insert(profiles, profiles->current,
+ cur_name, cur_color))
+ {
+ mq_profiles_save(profiles);
+ }
}
g_free(cur_name);
g_free(cur_color);