Bug 746086: NPE crash on onApplicationPause(). [r=mfinkle] [a=blocking-fennec]

This commit is contained in:
Sriram Ramasubramanian 2012-04-23 13:58:14 -07:00
parent e07a57f160
commit ddc3330503

View File

@ -2163,7 +2163,8 @@ abstract public class GeckoApp
Log.i(LOGTAG, "application paused");
GeckoAppShell.sendEventToGecko(GeckoEvent.createPauseEvent(true));
mConnectivityReceiver.unregisterFor(mAppContext);
if (mConnectivityReceiver != null)
mConnectivityReceiver.unregisterFor(mAppContext);
GeckoNetworkManager.getInstance().stop();
GeckoScreenOrientationListener.getInstance().stop();
}
@ -2174,7 +2175,8 @@ abstract public class GeckoApp
if (checkLaunchState(LaunchState.GeckoRunning))
GeckoAppShell.sendEventToGecko(GeckoEvent.createResumeEvent(true));
mConnectivityReceiver.registerFor(mAppContext);
if (mConnectivityReceiver != null)
mConnectivityReceiver.registerFor(mAppContext);
GeckoNetworkManager.getInstance().start();
GeckoScreenOrientationListener.getInstance().start();
}