fix segfault on quit
This commit is contained in:
parent
3da8bb06ed
commit
f9091fbce2
10
src/main.rs
10
src/main.rs
@ -140,16 +140,16 @@ fn main() {
|
|||||||
.create_statistics(&game_core, draw_handle.get_time());
|
.create_statistics(&game_core, draw_handle.get_time());
|
||||||
game_core.progress.update(&new_progress);
|
game_core.progress.update(&new_progress);
|
||||||
|
|
||||||
// For now, just quit
|
// Break the render loop
|
||||||
// This also throws a SEGFAULT.. yay for unsafe code..
|
break;
|
||||||
unsafe {
|
|
||||||
raylib::ffi::CloseWindow();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
game_core.switch_state(new_state, Some(&draw_handle));
|
game_core.switch_state(new_state, Some(&draw_handle));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Feed the audio engine
|
||||||
|
// audio_system.update();
|
||||||
|
|
||||||
// Feed the profiler
|
// Feed the profiler
|
||||||
// This only runs in the dev profile.
|
// This only runs in the dev profile.
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
|
Reference in New Issue
Block a user