diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index b58065be..32ff7d6e 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -1283,7 +1283,7 @@ public: { for (int i = 0 ; i < _nbLang ; ++i) { - if ((_langList[i]->_langID == langID) || (!_langList[i])) + if ( _langList[i] && _langList[i]->_langID == langID ) return _langList[i]; } return nullptr; diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 30976529..3c092e13 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -343,7 +343,7 @@ LRESULT CALLBACK ScintillaEditView::scintillaStatic_Proc(HWND hwnd, UINT Message bool isSynpnatic = std::string(synapticsHack) == "SynTrackCursorWindowClass"; bool makeTouchPadCompetible = ((NppParameters::getInstance())->getSVP())._disableAdvancedScrolling; - if (isSynpnatic || makeTouchPadCompetible) + if (pScint && (isSynpnatic || makeTouchPadCompetible)) return (pScint->scintillaNew_Proc(hwnd, Message, wParam, lParam)); ScintillaEditView *pScintillaOnMouse = (ScintillaEditView *)(::GetWindowLongPtr(hwndOnMouse, GWLP_USERDATA));