diff --git a/src/Widgets/AppIcon.vala b/src/Widgets/AppIcon.vala index cebccdce..c802a229 100644 --- a/src/Widgets/AppIcon.vala +++ b/src/Widgets/AppIcon.vala @@ -68,11 +68,12 @@ namespace Gala var wallpaper = (WorkspaceThumb.destination as WorkspaceThumb).wallpaper; icons.add_child (actor); - - var xids = app.get_xids (); - if (xids.length > 1) { //get all the windows that belong to this app + + // get all the windows that belong to this app, if possible + if (app != null && app.get_xids ().length > 1) { var wins = window.get_workspace ().list_windows (); - for (var i=0;i