Skip to content

Commit

Permalink
Android: Pass a null Bundle when calling QtActivityDelegate.onCreate
Browse files Browse the repository at this point in the history
The onCreate function expects a Bundle variable to be passed in so it
needs to get a null Bundle in this aspect to prevent it from crashing
due to the lack of parameters.

Change-Id: I8cc4b62d9e8db170b957f7574360033e91ca3493
Pick-to: 5.15 5.12
Reviewed-by: Assam Boudjelthia <[email protected]>
  • Loading branch information
AndyShawQt committed Jun 18, 2020
1 parent 4041610 commit 3ce2fab
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT

package org.qtproject.qt5.android.bindings;

import android.os.Bundle;
import android.content.ComponentName;
import android.content.pm.PackageManager;

Expand All @@ -55,8 +56,10 @@ public void onCreate() {
return;
}

if (QtApplication.m_delegateObject != null && QtApplication.onCreate != null)
QtApplication.invokeDelegateMethod(QtApplication.onCreate);
if (QtApplication.m_delegateObject != null && QtApplication.onCreate != null) {
Bundle bundle = null;
QtApplication.invokeDelegateMethod(QtApplication.onCreate, bundle);
}
startApp(true);
}

Expand Down

0 comments on commit 3ce2fab

Please sign in to comment.