From 9443e2e8f221e565f46423df099f56bec14c3ed2 Mon Sep 17 00:00:00 2001 From: Don HO Date: Tue, 2 Apr 2019 23:21:51 +0200 Subject: [PATCH] Fix a crash issue due to cfa702a8a87272c276e4cb46c8979f2418ef25e2 cfa702a8a87272c276e4cb46c8979f2418ef25e2 (Retain read only flag state in session) Crash can be reproduced by replacing the content by following code (replace YOUR_FULL_FILE_PATH by your existing full file path): --- PowerEditor/src/NppIO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index 6f18b830..244468c3 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -1833,7 +1833,7 @@ bool Notepad_plus::loadSession(Session & session, bool isSnapshotMode) } buf->setLangType(typeToSet, pLn); buf->setEncoding(session._subViewFiles[k]._encoding); - buf->setUserReadOnly(session._mainViewFiles[k]._isUserReadOnly); + buf->setUserReadOnly(session._subViewFiles[k]._isUserReadOnly); if (isSnapshotMode && session._subViewFiles[k]._backupFilePath != TEXT("") && PathFileExists(session._subViewFiles[k]._backupFilePath.c_str())) buf->setDirty(true);