Window.java: prevent calling set_widget_as_root() twice

This fixes a segfault in Cut The Rope introduced by commit 3399c84e84
This commit is contained in:
Julian Winkler
2023-10-14 10:59:27 +02:00
committed by Mis012
parent 43306bf174
commit e735757a2e

View File

@@ -41,8 +41,10 @@ public class Window {
} }
public void setContentView(View view) { public void setContentView(View view) {
contentView = view; if (view != contentView) {
set_widget_as_root(native_window, view.widget); contentView = view;
set_widget_as_root(native_window, view.widget);
}
} }
public View getDecorView() { public View getDecorView() {