summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-03 13:37:03 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-03 13:37:03 +0300
commit6572e18ded9435263f63459290175665ff690332 (patch)
tree5a523dbd8a64e41fb740ff110a274f3082f725e8
parenta940d0e221fe039209aad481035e7e736765f267 (diff)
App: Crash with --echo when shutting down
-rw-r--r--src/app.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/app.c b/src/app.c
index 3c1dd025..ef130770 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1310,9 +1310,10 @@ void postCommand_Root(iRoot *d, const char *command) {
1310 ev.user.data2 = d; /* all events are root-specific */ 1310 ev.user.data2 = d; /* all events are root-specific */
1311 SDL_PushEvent(&ev); 1311 SDL_PushEvent(&ev);
1312 if (app_.commandEcho) { 1312 if (app_.commandEcho) {
1313 iWindow *win = get_Window();
1313 printf("%s[command] {%d} %s\n", 1314 printf("%s[command] {%d} %s\n",
1314 app_.isLoadingPrefs ? "[Prefs] " : "", 1315 app_.isLoadingPrefs ? "[Prefs] " : "",
1315 (d == NULL ? 0 : d == get_Window()->roots[0] ? 1 : 2), 1316 (d == NULL || win == NULL ? 0 : d == win->roots[0] ? 1 : 2),
1316 command); fflush(stdout); 1317 command); fflush(stdout);
1317 } 1318 }
1318} 1319}