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,9 +41,11 @@ public class Window {
} }
public void setContentView(View view) { public void setContentView(View view) {
if (view != contentView) {
contentView = view; contentView = view;
set_widget_as_root(native_window, view.widget); set_widget_as_root(native_window, view.widget);
} }
}
public View getDecorView() { public View getDecorView() {
return new View(); // FIXME: this can probably backfire return new View(); // FIXME: this can probably backfire