am ac03330c: Fix 2583234 - It\'s ok for mCallbacks to be null.

This commit is contained in:
Joe Onorato
2010-04-15 06:36:01 -07:00
committed by Android Git Automerger
+5 -1
View File
@@ -432,7 +432,7 @@ public class LauncherModel extends BroadcastReceiver {
Log.d(TAG, "startLoader isLaunching=" + isLaunching);
}
// Don't bother to start the thread if we know it's not going to do anything
if (mCallbacks.get() != null) {
if (mCallbacks != null && mCallbacks.get() != null) {
LoaderThread oldThread = mLoaderThread;
if (oldThread != null) {
if (oldThread.isLaunching()) {
@@ -635,6 +635,10 @@ public class LauncherModel extends BroadcastReceiver {
return null;
}
if (mCallbacks == null) {
return null;
}
final Callbacks callbacks = mCallbacks.get();
if (callbacks != oldCallbacks) {
return null;