We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fbde07 commit 3e55bf1Copy full SHA for 3e55bf1
flutter/flutter.go
@@ -82,6 +82,13 @@ func (flu *EngineOpenGL) Index() int {
82
83
// Run launches the Flutter Engine in a background thread.
84
func (flu *EngineOpenGL) Run(window uintptr, vmArgs []string) Result {
85
+ // validate this EngineOpenGL was created correctly
86
+ flutterEnginesLock.RLock()
87
+ if len(flutterEngines) <= flu.index || flutterEngines[flu.index] != flu {
88
+ panic("EngineOpenGL was wrongly created. Use embedder.NewEngineOpenGL().")
89
+ }
90
+ flutterEnginesLock.RUnlock()
91
+
92
args := C.FlutterProjectArgs{
93
assets_path: C.CString(flu.AssetsPath),
94
icu_data_path: C.CString(flu.IcuDataPath),
0 commit comments