GNOME Bugzilla – Bug 682252
Crashes if default bg not installed
Last modified: 2012-08-20 13:59:15 UTC
If the default bg is not installed, then the gnome_bg_load_from_preferences() call to g_settings_get_mapped() will crash with: if (!mapping (NULL, &result, user_data)) g_error ("The mapping function given to g_settings_get_mapped() for key " "`%s' in schema `%s' returned FALSE when given a NULL value.", key, g_settings_schema_get_id (settings->priv->schema));
Created attachment 221824 [details] [review] Fix crash if default background not found Its a hard error (i.e. crash) if you return FALSE from the final fallback in a g_settings_get_mapped map function. Fix that by returning NULL.
(In reply to comment #1) > Created an attachment (id=221824) [details] [review] > Fix crash if default background not found > > Its a hard error (i.e. crash) if you return FALSE from > the final fallback in a g_settings_get_mapped map function. > Fix that by returning NULL. Fix that by returning TRUE...
> Fix that by returning TRUE... Perhaps confusing, but i was refering to *result which is now NULL.
Created attachment 221845 [details] [review] Fix crash if default background not found Its a hard error (i.e. crash) if you return FALSE from the final fallback in a g_settings_get_mapped map function. Fix that by returning TRUE with a NULL result.
Attachment 221824 [details] pushed as 443f4a5 - Fix crash if default background not found Attachment 221845 [details] pushed as 443f4a5 - Fix crash if default background not found