NotificationDaemon: don't fail if a tray icon has no WM_CLASS

If there is no WM_CLASS for a tray icon, it returns null, not the empty
string. Detect that case without an exception.

https://bugzilla.gnome.org/show_bug.cgi?id=683724
This commit is contained in:
Giovanni Campagna 2012-09-10 15:43:24 +02:00
parent 00e0d24a6a
commit 7ebb5c6a10

View File

@ -499,7 +499,7 @@ const NotificationDaemon = new Lang.Class({
},
_onTrayIconAdded: function(o, icon) {
let wmClass = icon.wm_class.toLowerCase();
let wmClass = icon.wm_class ? icon.wm_class.toLowerCase() : '';
if (STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass] !== undefined)
return;