aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-status-presets.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-status-presets.c')
-rw-r--r--libempathy/empathy-status-presets.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/libempathy/empathy-status-presets.c b/libempathy/empathy-status-presets.c
index c91895eeb..135212cc5 100644
--- a/libempathy/empathy-status-presets.c
+++ b/libempathy/empathy-status-presets.c
@@ -131,16 +131,17 @@ status_presets_file_parse (const gchar *filename)
if (state_str) {
state = empathy_presence_from_str (state_str);
-
- if (is_default) {
- DEBUG ("Default status preset state is:"
- " '%s', status:'%s'", state_str,
- status);
-
- status_presets_set_default (state, status);
- } else {
- preset = status_preset_new (state, status);
- presets = g_list_append (presets, preset);
+ if (empathy_status_presets_is_valid (state)) {
+ if (is_default) {
+ DEBUG ("Default status preset state is:"
+ " '%s', status:'%s'", state_str,
+ status);
+
+ status_presets_set_default (state, status);
+ } else {
+ preset = status_preset_new (state, status);
+ presets = g_list_append (presets, preset);
+ }
}
}