[gtk/gtk-4-6] gtkplacessidebar: Prevent calling g_object_unref on null
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-4-6] gtkplacessidebar: Prevent calling g_object_unref on null
- Date: Wed, 16 Mar 2022 02:20:18 +0000 (UTC)
commit 9cc051ffa58327183362b321a1696a475a29d02c
Author: Fina Wilke <code felinira net>
Date: Mon Mar 14 22:33:35 2022 +0100
gtkplacessidebar: Prevent calling g_object_unref on null
g_object_unref would be called on a null end_icon when provider_account_status
is CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE
gtk/gtkplacessidebar.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index edc0620189..60f07e4558 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -921,7 +921,10 @@ create_cloud_provider_account_row (GtkPlacesSidebar *sidebar,
g_free (tooltip);
g_free (mount_uri);
- g_object_unref (end_icon);
+ if (end_icon) {
+ g_object_unref (end_icon);
+ }
+
return TRUE;
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]