Fix widget stopListening NPE.
lookupHostLocked caller needs to check for null return value.
This commit is contained in:
@ -473,8 +473,10 @@ class AppWidgetService extends IAppWidgetService.Stub
|
||||
public void stopListening(int hostId) {
|
||||
synchronized (mAppWidgetIds) {
|
||||
Host host = lookupHostLocked(getCallingUid(), hostId);
|
||||
host.callbacks = null;
|
||||
pruneHostLocked(host);
|
||||
if (host != null) {
|
||||
host.callbacks = null;
|
||||
pruneHostLocked(host);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user