Skip to content

Commit

Permalink
fixed crash when closing scenes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed May 13, 2024
1 parent 1bf9ae3 commit 40de0ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions editor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1976,8 +1976,9 @@ impl Editor {
}

fn set_current_scene(&mut self, id: Uuid) {
assert!(self.scenes.set_current_scene(id));
self.on_scene_changed();
if self.scenes.set_current_scene(id) {
self.on_scene_changed();
}
}

fn on_scene_changed(&mut self) {
Expand Down

0 comments on commit 40de0ff

Please sign in to comment.