Skip to content

Commit 06ddbce

Browse files
authored
Stop the engine before destroying the surface (#315)
* This fixes the crash that occurs when terminating flutter-tizen app Signed-off-by: Boram Bae <[email protected]>
1 parent 015bfbf commit 06ddbce

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

shell/platform/tizen/flutter_tizen_engine.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ bool FlutterTizenEngine::StopEngine() {
267267
tizen_vsync_waiter_.reset();
268268
#endif
269269
FlutterEngineResult result = embedder_api_.Shutdown(engine_);
270+
view_ = nullptr;
270271
engine_ = nullptr;
271272
return (result == kSuccess);
272273
}

shell/platform/tizen/flutter_tizen_view.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ FlutterTizenView::FlutterTizenView(std::unique_ptr<TizenViewBase> tizen_view)
5454
}
5555

5656
FlutterTizenView::~FlutterTizenView() {
57+
if (engine_) {
58+
engine_->StopEngine();
59+
}
5760
DestroyRenderSurface();
5861
}
5962

0 commit comments

Comments
 (0)