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.
This commit is contained in:
parent
5eafb29332
commit
68723f191c
@ -190,6 +190,7 @@ NotificationDaemon.prototype = {
|
|||||||
let busProxy = new Bus();
|
let busProxy = new Bus();
|
||||||
busProxy.GetConnectionUnixProcessIDRemote(sender, function (result, excp) {
|
busProxy.GetConnectionUnixProcessIDRemote(sender, function (result, excp) {
|
||||||
let app = Shell.WindowTracker.get_default().get_app_from_pid(result);
|
let app = Shell.WindowTracker.get_default().get_app_from_pid(result);
|
||||||
|
if (app)
|
||||||
source.setApp(app);
|
source.setApp(app);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user