flutter: java: Do not call supper.attachBaseContext if base is null

This commit is contained in:
Calcitem 2021-05-17 16:20:49 +08:00
parent b6947421e3
commit bf2d7131e1
1 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,9 @@ public class MainActivity extends FlutterActivity {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
if (base != null) {
super.attachBaseContext(base);
}
// Initialize xCrash.
if (Build.VERSION.SDK_INT >= 19) {