Avoid uninitialized Surface configuration on Wasm
This commit is contained in:
parent
ff011e5dfd
commit
8a86ef14e3
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue