Avoid uninitialized Surface configuration on Wasm

This commit is contained in:
Héctor Ramón Jiménez 2024-02-20 02:51:20 +01:00
parent ff011e5dfd
commit 8a86ef14e3
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -257,7 +257,9 @@ impl graphics::Compositor for Compositor {
.create_surface(window)
.expect("Create surface");
self.configure_surface(&mut surface, width, height);
if width > 0 && height > 0 {
self.configure_surface(&mut surface, width, height);
}
surface
}