From 0e03d8cb971fa4fb0865dcc9a0e25f822d7c8434 Mon Sep 17 00:00:00 2001
From: Jaakko Keranen jaakko.keranen@iki.fi
Date: Mon, 2 Nov 2020 19:53:10 +0200
Subject: [PATCH 1/1] Fixed potential crash at app shutdown
Delete garbage collected widgets in Window deinitialization.
Widgets should not continue to exist if there is no Window.
src/app.c | 1 +
src/main.c | 1 -
src/ui/window.c | 1 +
3 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/app.c b/src/app.c
index c2d5b732..8c14c6e6 100644
--- a/src/app.c
+++ b/src/app.c
@@ -444,6 +444,7 @@ static void deinit_App(iApp *d) {
deinit_CommandLine(&d->args);
iRelease(d->launchCommands);
delete_String(d->execPath);
}
const iString *execPath_App(void) {
diff --git a/src/main.c b/src/main.c
index 2f9eda0e..e2c2cc83 100644
--- a/src/main.c
+++ b/src/main.c
@@ -59,7 +59,6 @@ int main(int argc, char **argv) {
return -1;
}
run_App(argc, argv);
SDL_Quit();
#if defined (LAGRANGE_ENABLE_MPG123)
mpg123_exit();
diff --git a/src/ui/window.c b/src/ui/window.c
index 21338fa8..8aa701e3 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -605,6 +605,7 @@ void init_Window(iWindow *d, iRect rect) {
}
void deinit_Window(iWindow *d) {
if (theWindow_ == d) {
theWindow_ = NULL;
}
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).