[gnome-software/wip/gs-dbus-helper-use-non-NULL-values-for-actions: 6/6] gs-dbus-helper: Use non-NULL values for GNotification actions
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/gs-dbus-helper-use-non-NULL-values-for-actions: 6/6] gs-dbus-helper: Use non-NULL values for GNotification actions
- Date: Mon, 12 Sep 2022 07:56:57 +0000 (UTC)
commit edc451967de53ac184ab8627c13947f8225d2771
Author: Milan Crha <mcrha redhat com>
Date: Wed Sep 7 17:40:18 2022 +0200
gs-dbus-helper: Use non-NULL values for GNotification actions
There are printed runtime warnings on the console when the values are NULL,
thus make sure the functions do not pass NULL to the functions.
src/gs-dbus-helper.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/gs-dbus-helper.c b/src/gs-dbus-helper.c
index 594ee788e..90b87fe98 100644
--- a/src/gs-dbus-helper.c
+++ b/src/gs-dbus-helper.c
@@ -326,6 +326,12 @@ notify_search_resources (GsExtrasPageMode mode,
mode_string = gs_extras_page_mode_to_string (mode);
+ /* Make sure non-NULL values are used */
+ if (desktop_id == NULL)
+ desktop_id = "";
+ if (ident == NULL)
+ ident = "";
+
n = g_notification_new (title);
g_notification_set_body (n, body);
/* TRANSLATORS: this is a button that launches gnome-software */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]