summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-12 09:10:53 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-12 09:10:53 +0300
commit49bdcc535b1f686abcd110bd5daa64e7d6286bbc (patch)
treec8c40f8528e0a894e7f83c62e1c9465b93c1be9e /src/app.c
parent85c77f3eed5e00a692fb33740fe52bb95f5eb499 (diff)
App: Mitigations against a possible crash
A tab switch may have ended up accessing a NULL pointer.
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/app.c b/src/app.c
index d8053315..3107cda3 100644
--- a/src/app.c
+++ b/src/app.c
@@ -397,7 +397,7 @@ static iBool loadState_App_(iApp *d) {
397 readData_File(f, 4, magic); 397 readData_File(f, 4, magic);
398 if (!memcmp(magic, magicTabDocument_App_, 4)) { 398 if (!memcmp(magic, magicTabDocument_App_, 4)) {
399 if (!doc) { 399 if (!doc) {
400 doc = newTab_App(NULL, iTrue); 400 doc = newTab_App(NULL, iFalse /* no switching */);
401 } 401 }
402 if (read8_File(f)) { 402 if (read8_File(f)) {
403 current = doc; 403 current = doc;