From f20a8909d11ac0989c6495e87041966be3c2b591 Mon Sep 17 00:00:00 2001
From: agilob <info@agilob.net>
Date: Thu, 23 Apr 2015 07:57:34 +0100
Subject: [PATCH] fixes SecUpwN/Android-IMSI-Catcher-Detector#383 apparently
 list of neighboring cell can be null

---
 app/src/main/java/com/SecUpwN/AIMSICD/service/CellTracker.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/src/main/java/com/SecUpwN/AIMSICD/service/CellTracker.java b/app/src/main/java/com/SecUpwN/AIMSICD/service/CellTracker.java
index da155edf..b1095e22 100644
--- a/app/src/main/java/com/SecUpwN/AIMSICD/service/CellTracker.java
+++ b/app/src/main/java/com/SecUpwN/AIMSICD/service/CellTracker.java
@@ -537,7 +537,7 @@ public class CellTracker implements SharedPreferences.OnSharedPreferenceChangeLi
          */
         //TinyDB tinydb = new TinyDB(context);
         Integer ncls = 0;
-        if(tm != null) //https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/issues/383
+        if(tm != null && tm.getNeighboringCellInfo() != null) //https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/issues/383
             ncls = tm.getNeighboringCellInfo().size(); // NC list size
         Boolean nclp = tinydb.getBoolean("nc_list_present"); // NC list present? (default is false)
 
-- 
GitLab