From 1445903a34fd339abadf9ef43ae7f53c4e157902 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 19 Aug 2014 14:06:10 -0400 Subject: [PATCH] prefs: Don't crash when we get a preference changed we don't know about We commonly used the generic, undetailed signal 'changed' to track changes to preferences. Since we crash on unknown preference types, this can be dangerous if somebody adds a new setting that has a type we're unfamiliar with, and something else changes it. Instead of crashing, just fizzle out doing nothing. --- src/core/prefs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/prefs.c b/src/core/prefs.c index c1d541105..647f01afa 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -1210,8 +1210,9 @@ settings_changed (GSettings *settings, } else { - /* Someone added a preference of an unhandled type */ - g_assert_not_reached (); + /* Unknown preference type. This quite likely simply isn't + * a preference we track changes to. */ + return; } g_variant_unref (value);