diff --git a/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart b/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart index 536a7d52..ec6fec46 100644 --- a/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart +++ b/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart @@ -98,7 +98,9 @@ class ThermionFlutterMethodChannelPlatform extends ThermionFlutterPlatform { if (FilamentApp.instance == null) { await FFIFilamentApp.create(config: config); FilamentApp.instance!.onDestroy(() async { - await channel.invokeMethod("destroyContext"); + if(Platform.isWindows) { + await channel.invokeMethod("destroyContext"); + } _swapChain = null; }); }