mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-16 20:05: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) {
|
||||
if (!win) {
|
||||
debug("window has already been freed.");
|
||||
return;
|
||||
}
|
||||
|
||||
glfwDestroyWindow(win);
|
||||
render_free();
|
||||
win = NULL;
|
||||
|
||||
@@ -34,8 +34,8 @@ int main(int argc, char **argv) {
|
||||
fatal("failed to initialise!");
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user