Skip to content

Commit 0dcf151

Browse files
committed
Fixed a null pointer exception.
1 parent 01b7329 commit 0dcf151

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CoreLibrary/src/main/java/com/didi/virtualapk/delegate/LocalService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ public int onStartCommand(Intent intent, int flags, int startId) {
8484

8585
ComponentName component = target.getComponent();
8686
LoadedPlugin plugin = mPluginManager.getLoadedPlugin(component);
87+
88+
if (plugin == null) {
89+
Log.w(TAG, "Error target: " + target.toURI());
90+
return START_STICKY;
91+
}
8792
// ClassNotFoundException when unmarshalling in Android 5.1
8893
target.setExtrasClassLoader(plugin.getClassLoader());
8994
switch (command) {

0 commit comments

Comments
 (0)