[mutter/gnome-3-36] startup: Fix possible crash in startup notifications



commit 1015dffc6a31b695fa5257713212fc20ff81c7b9
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.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1392
    
    (cherry picked from commit 5962ee79390a34e8b550bc6deb21b402182ca11e)

 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]