Skip to content

Commit 3eb07e1

Browse files
committed
Clean up existing instances when updating the platform view
* This fix problem that occurs when a view is created on restart with identical view id. Signed-off-by: MuHong Byun <mh.byun@samsung.com>
1 parent f1add55 commit 3eb07e1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

shell/platform/tizen/channels/platform_view_channel.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ void PlatformViewChannel::HandleMethodCall(
135135
focused_view->second->SetFocus(false);
136136
}
137137

138+
auto existing_view = view_instances_.find(view_id);
139+
if (existing_view != view_instances_.end()) {
140+
existing_view->second->Dispose();
141+
view_instances_.erase(existing_view);
142+
}
143+
138144
auto view_instance =
139145
it->second->Create(view_id, width, height, byte_message);
140146
if (view_instance) {

0 commit comments

Comments
 (0)