mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
background: Don't silently fizzle out when removing bad content from the cache
If the background is already removed, or we're trying to remove bad content, this is probably a bug in content accounting, so let us crash so we can fix the bugs. https://bugzilla.gnome.org/show_bug.cgi?id=719803
This commit is contained in:
parent
4cfb000812
commit
7249b11899
1 changed files with 3 additions and 3 deletions
|
|
@ -113,9 +113,9 @@ const BackgroundCache = new Lang.Class({
|
|||
|
||||
_removeContent: function(contentList, content) {
|
||||
let index = contentList.indexOf(content);
|
||||
|
||||
if (index >= 0)
|
||||
contentList.splice(index, 1);
|
||||
if (index < 0)
|
||||
throw new Error("Trying to remove invalid content: " + content);
|
||||
contentList.splice(index, 1);
|
||||
},
|
||||
|
||||
removePatternContent: function(content) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue