throw Excepton in Dart controller if viewer null

This commit is contained in:
Nick Fisher committed 2023-10-03 00:19:59 +08:00
1 parent d6e527f3c0
commit df3bddcd86
2 files changed
+6 -4

No files matched your search

+4
View File
@@ -142,6 +142,10 @@ class FilamentControllerFFI extends FilamentController {
renderCallback,
renderCallbackOwner);
if (_viewer!.address == 0) {
throw Exception("Failed to create viewer. Check logs for details");
}
_lib.create_swap_chain_ffi(
_viewer!, Pointer<Void>.fromAddress(surfaceAddress), width, height);
if (nativeTexture != 0) {