[gnome-shell] background: Remove more bogus checks



commit dbdc884c960e3fe05d3dc3729fd923ca706a6a35
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Dec 3 15:45:53 2013 -0500

    background: Remove more bogus checks
    
    The content in these arrays can never be null...
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719803

 js/ui/background.js |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 1f9e494..0a21bd2 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -50,11 +50,9 @@ const BackgroundCache = new Lang.Class({
                                         effects: Meta.BackgroundEffects.NONE });
 
         let content = null;
+
         let candidateContent = null;
         for (let i = 0; i < this._patterns.length; i++) {
-            if (!this._patterns[i])
-                continue;
-
             if (this._patterns[i].get_shading() != params.shadingType)
                 continue;
 
@@ -88,7 +86,6 @@ const BackgroundCache = new Lang.Class({
         }
 
         this._patterns.push(content);
-
         return content;
     },
 
@@ -210,11 +207,9 @@ const BackgroundCache = new Lang.Class({
                                         onFinished: null });
 
         let content = null;
+
         let candidateContent = null;
         for (let i = 0; i < this._images.length; i++) {
-            if (!this._images[i])
-                continue;
-
             if (this._images[i].get_style() != params.style)
                 continue;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]