Bug 1095914 - Fix NPE from no app context. r=vng

https://github.com/mozilla/MozStumbler/pull/1195
1187 - NPE - Appears to be from no app context
This commit is contained in:
Garvan Keeley 2014-11-08 09:09:00 -05:00
parent 0f54d54527
commit 163c7f8745

View File

@ -98,6 +98,11 @@ public class ScanManager {
}
mContext = context.getApplicationContext();
if (mContext == null) {
Log.w(LOG_TAG, "No app context available.");
return;
}
if (mGPSScanner == null) {
mGPSScanner = new GPSScanner(context, this);
mWifiScanner = new WifiScanner(context);