[gnome-maps] placeStore: Check property before use



commit 42649db2c02dff2253a53c913d97416cdaceb933
Author: Marcus Lundblad <ml update uu se>
Date:   Tue Nov 7 22:07:50 2017 +0100

    placeStore: Check property before use
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782861

 src/placeStore.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/placeStore.js b/src/placeStore.js
index f768f08..0ef95c6 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -305,7 +305,7 @@ var PlaceStore = new Lang.Class({
     },
 
     exists: function(place, type) {
-        if (type !== undefined && type !== null)
+        if (type !== undefined && type !== null && this._typeTable[place.uniqueID])
             return this._typeTable[place.uniqueID] === type;
         else
             return this._typeTable[place.uniqueID] !== undefined;


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