Skip to content

Commit

Permalink
Stop the engine before destroying the surface (#315)
Browse files Browse the repository at this point in the history
* This fixes the crash that occurs when terminating flutter-tizen app

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
  • Loading branch information
bbrto21 authored Jul 20, 2022
1 parent 015bfbf commit 06ddbce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions shell/platform/tizen/flutter_tizen_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ bool FlutterTizenEngine::StopEngine() {
tizen_vsync_waiter_.reset();
#endif
FlutterEngineResult result = embedder_api_.Shutdown(engine_);
view_ = nullptr;
engine_ = nullptr;
return (result == kSuccess);
}
Expand Down
3 changes: 3 additions & 0 deletions shell/platform/tizen/flutter_tizen_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ FlutterTizenView::FlutterTizenView(std::unique_ptr<TizenViewBase> tizen_view)
}

FlutterTizenView::~FlutterTizenView() {
if (engine_) {
engine_->StopEngine();
}
DestroyRenderSurface();
}

Expand Down

0 comments on commit 06ddbce

Please sign in to comment.