Skip to content

Commit d6c0bc9

Browse files
committed
maybe fix crash in SaveAnnotationsAndCloseEditAnnowtationsWindow()
1 parent 8760624 commit d6c0bc9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/SumatraPDF.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4124,6 +4124,9 @@ static int TestBigNew()
41244124
#endif
41254125

41264126
static void SaveAnnotationsAndCloseEditAnnowtationsWindow(TabInfo* tab) {
4127+
if (!tab || !tab->AsFixed()) {
4128+
return;
4129+
}
41274130
EngineBase* engine = tab->AsFixed()->GetEngine();
41284131
auto path = ToUtf8Temp(engine->FileName());
41294132
bool ok = EngineMupdfSaveUpdated(engine, {}, [&tab, &path](std::string_view mupdfErr) {

0 commit comments

Comments
 (0)