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.
This commit is contained in:
Jasper St. Pierre 2014-08-19 14:06:10 -04:00
parent 5d9386df0c
commit 1445903a34

View File

@ -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);