From 49bdcc535b1f686abcd110bd5daa64e7d6286bbc Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 12 Apr 2021 09:10:53 +0300 Subject: App: Mitigations against a possible crash A tab switch may have ended up accessing a NULL pointer. --- src/app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/app.c') 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) { readData_File(f, 4, magic); if (!memcmp(magic, magicTabDocument_App_, 4)) { if (!doc) { - doc = newTab_App(NULL, iTrue); + doc = newTab_App(NULL, iFalse /* no switching */); } if (read8_File(f)) { current = doc; -- cgit v1.2.3