Skip to content

Commit 43a6b39

Browse files
committed
[Windows] Fix resize crash
1 parent 1efe8ba commit 43a6b39

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

shell/platform/windows/flutter_windows_view.cc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,10 +597,15 @@ void FlutterWindowsView::OnFramePresented() {
597597
switch (resize_status_) {
598598
case ResizeState::kResizeStarted:
599599
// The caller must first call |OnFrameGenerated| or
600-
// |OnEmptyFrameGenerated| before calling this method. This status
601-
// indicates the caller did not call these methods or ignored their
602-
// result.
603-
FML_UNREACHABLE();
600+
// |OnEmptyFrameGenerated| before calling this method. This
601+
// indicates one of the following:
602+
//
603+
// 1. The caller did not call these methods.
604+
// 2. The caller ignored these methods' result.
605+
// 3. The platform thread started a resize after the caller called these
606+
// methods. We might have presented a frame of the wrong size to the
607+
// view.
608+
return;
604609
case ResizeState::kFrameGenerated: {
605610
// A frame was generated for a pending resize.
606611
// Unblock the platform thread.

0 commit comments

Comments
 (0)