From fcfb3a75a685f527973d0c4177aad3babf574902 Mon Sep 17 00:00:00 2001 From: coconil Date: Thu, 2 Feb 2023 23:25:25 +0800 Subject: [PATCH] fix build fail on linux --- src/cceditor/ccnotepad.cpp | 2 +- src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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";