Skip to content

Commit

Permalink
fix: crash on resizing macOS window
Browse files Browse the repository at this point in the history
The render is briefly `nil` and the `!` makes the app crash.
  • Loading branch information
mark-nicepants authored Oct 19, 2022
1 parent b00a33c commit 4b84e90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flutter_gl_macos/macos/Classes/FlutterGlMacosPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public class FlutterGlMacosPlugin: NSObject, FlutterPlugin {

let render = self.renders[textureId!];

let resp = render!.updateTexture(sourceTexture: sourceTexture!);
let resp = render?.updateTexture(sourceTexture: sourceTexture!);

result(resp);
default:
Expand Down

0 comments on commit 4b84e90

Please sign in to comment.