From 1e0b0b2cd9199d6fefa9d2eb1d36fe71a712d911 Mon Sep 17 00:00:00 2001 From: SinghRajenM Date: Thu, 8 Mar 2018 20:23:57 +0530 Subject: [PATCH] Fix crash on styler dialog of User Defined Language dialog Fixes #2646, fixes #4215, close #4279 --- PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp index ea30976bb..6d4c1e2ee 100644 --- a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp +++ b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp @@ -1667,6 +1667,9 @@ INT_PTR CALLBACK StylerDlg::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPAR case WM_COMMAND : { + if (dlg == nullptr) + return FALSE; + Style & style = SharedParametersDialog::_pUserLang->_styleArray.getStyler(dlg->_stylerIndex); if (HIWORD(wParam) == CBN_SELCHANGE) {