mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 03:25:45 +01:00
fix: don't free window twice
This commit is contained in:
@@ -75,6 +75,11 @@ void window_close(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void window_free(void) {
|
void window_free(void) {
|
||||||
|
if (!win) {
|
||||||
|
debug("window has already been freed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
glfwDestroyWindow(win);
|
glfwDestroyWindow(win);
|
||||||
render_free();
|
render_free();
|
||||||
win = NULL;
|
win = NULL;
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ int main(int argc, char **argv) {
|
|||||||
fatal("failed to initialise!");
|
fatal("failed to initialise!");
|
||||||
|
|
||||||
window_loop();
|
window_loop();
|
||||||
window_free();
|
|
||||||
|
|
||||||
// return success, since some architectures do not follow 0=success
|
/* return success, since some architectures do not follow 0=success
|
||||||
|
* This action will call `quit`. */
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user