diff --git a/js/ui/background.js b/js/ui/background.js index a56a0af8b..20a3a4030 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -125,7 +125,8 @@ const BackgroundCache = new Lang.Class({ removeImageContent: function(content) { let filename = content.get_filename(); - if (filename && this._fileMonitors[filename]) + let hasOtherUsers = this._images.some(function(content) { return filename == content.get_filename(); }); + if (!hasOtherUsers) delete this._fileMonitors[filename]; this._removeContent(this._images, content);