mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 05:00:09 +00:00
places sidebar: Make a function NULL-safe
gtk_places_sidebar_set_location's location argument is documented as allow-none, but if one actually passes NULL, a warning results. Fix that.
This commit is contained in:
parent
e31e88582f
commit
f211031a9f
@ -4790,7 +4790,9 @@ gtk_places_sidebar_set_location (GtkPlacesSidebar *sidebar,
|
||||
|
||||
if (sidebar->current_location != NULL)
|
||||
g_object_unref (sidebar->current_location);
|
||||
sidebar->current_location = g_object_ref (location);
|
||||
sidebar->current_location = location;
|
||||
if (sidebar->current_location != NULL)
|
||||
g_object_ref (sidebar->current_location);
|
||||
|
||||
if (location == NULL)
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user