diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js index f48a37fa5..c99e812aa 100644 --- a/js/ui/remoteSearch.js +++ b/js/ui/remoteSearch.js @@ -191,7 +191,9 @@ const RemoteSearchProvider = new Lang.Class({ }, createIcon: function(size, meta) { - let gicon; + let gicon = null; + let icon = null; + if (meta['icon']) { gicon = Gio.icon_deserialize(meta['icon']); } else if (meta['gicon']) { @@ -203,8 +205,10 @@ const RemoteSearchProvider = new Lang.Class({ bitsPerSample, width, height, rowStride); } - return new St.Icon({ gicon: gicon, - icon_size: size }); + if (gicon) + icon = new St.Icon({ gicon: gicon, + icon_size: size }); + return icon; }, filterResults: function(results, maxNumber) {