background: Remove more bogus checks

The content in these arrays can never be null...

https://bugzilla.gnome.org/show_bug.cgi?id=719803
This commit is contained in:
Jasper St. Pierre 2013-12-03 15:45:53 -05:00
parent 5166354e34
commit dbdc884c96

View File

@ -50,11 +50,9 @@ const BackgroundCache = new Lang.Class({
effects: Meta.BackgroundEffects.NONE }); effects: Meta.BackgroundEffects.NONE });
let content = null; let content = null;
let candidateContent = null; let candidateContent = null;
for (let i = 0; i < this._patterns.length; i++) { for (let i = 0; i < this._patterns.length; i++) {
if (!this._patterns[i])
continue;
if (this._patterns[i].get_shading() != params.shadingType) if (this._patterns[i].get_shading() != params.shadingType)
continue; continue;
@ -88,7 +86,6 @@ const BackgroundCache = new Lang.Class({
} }
this._patterns.push(content); this._patterns.push(content);
return content; return content;
}, },
@ -210,11 +207,9 @@ const BackgroundCache = new Lang.Class({
onFinished: null }); onFinished: null });
let content = null; let content = null;
let candidateContent = null; let candidateContent = null;
for (let i = 0; i < this._images.length; i++) { for (let i = 0; i < this._images.length; i++) {
if (!this._images[i])
continue;
if (this._images[i].get_style() != params.style) if (this._images[i].get_style() != params.style)
continue; continue;