diff --git a/src/cceditor/ccnotepad.cpp b/src/cceditor/ccnotepad.cpp index cdd5150..ae615be 100755 --- a/src/cceditor/ccnotepad.cpp +++ b/src/cceditor/ccnotepad.cpp @@ -8770,7 +8770,7 @@ void CCNotePad::slot_formatXml() void CCNotePad::slot_formatJson() { ScintillaEditView* _pEditView = getCurEditView(); - if (_pEditView == nullptr && _pEditView->isReadOnly()) + if (_pEditView == nullptr || _pEditView->isReadOnly()) { return; } diff --git a/src/main.cpp b/src/main.cpp index b3b4fd6..03e4cb3 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,9 +31,9 @@ #include const ULONG_PTR CUSTOM_TYPE = 10000; const ULONG_PTR OPEN_NOTEPAD_TYPE = 10001; -bool s_isAdminAuth = false; #endif +bool s_isAdminAuth = false; const QString c_strTitle = "Ndd";