From 1348956a03c7c9030d9bb9a63899dc051abafd4d Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Mon, 25 Jun 2018 16:32:38 -0700 Subject: [PATCH] Check for calls to FlutterMain.ensureInitializationComplete before startInitialization (flutter/engine#5614) --- .../shell/platform/android/io/flutter/view/FlutterMain.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterMain.java b/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterMain.java index 876617bdc5..6ccdd54d5e 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterMain.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterMain.java @@ -187,6 +187,9 @@ public class FlutterMain { if (Looper.myLooper() != Looper.getMainLooper()) { throw new IllegalStateException("ensureInitializationComplete must be called on the main thread"); } + if (sSettings == null) { + throw new IllegalStateException("ensureInitializationComplete must be called after startInitialization"); + } if (sInitialized) { return; }