[mutter/benzea/fix-notification-crash] startup: Fix possible crash in startup notifications




commit 5aed5c9d774c792d6fb8815c78e3e3b5c88688db
Author: Benjamin Berg <bberg redhat com>
Date:   Fri Jul 31 15:21:32 2020 +0200

    startup: Fix possible crash in startup notifications
    
    A GAppInfo is not guaranteed to have a filename or an application (or
    rather a desktop ID). Add a check for application_id to be non-NULL
    before trying to call sn_launcher_set_application_id, which would crash
    otherwise.

 src/x11/meta-startup-notification-x11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/x11/meta-startup-notification-x11.c b/src/x11/meta-startup-notification-x11.c
index 045ee77687..da80f5e149 100644
--- a/src/x11/meta-startup-notification-x11.c
+++ b/src/x11/meta-startup-notification-x11.c
@@ -355,7 +355,7 @@ meta_x11_startup_notification_launch (MetaX11Display *x11_display,
                            (gpointer *) &func);
         }
 
-      if (func)
+      if (func && application_id)
         func (sn_launcher, application_id);
 
       g_module_close (self);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]