[gnome-shell] notificationDaemon.js: don't call setApp() if app couldn't be determined



commit 68723f191cd80d33c04fc8a7867950ea79ed65b0
Author: Siegfried-Angel Gevatter Pujals <rainct ubuntu com>
Date:   Wed Mar 31 15:21:54 2010 +0200

    notificationDaemon.js: don't call setApp() if app couldn't be determined
    
    Notify() was calling setApp() unconditionally after attempting to
    determine an application. However, determining the application can
    fail (for example, when notify-send is used) and resulted in an exception
    being printed.

 js/ui/notificationDaemon.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index 367152e..258dca8 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -190,7 +190,8 @@ NotificationDaemon.prototype = {
             let busProxy = new Bus();
             busProxy.GetConnectionUnixProcessIDRemote(sender, function (result, excp) {
                 let app = Shell.WindowTracker.get_default().get_app_from_pid(result);
-                source.setApp(app);
+                if (app)
+                    source.setApp(app);
             });
         } else {
             source.update(icon, hints);



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