From a80ee0d2fa7807e09a405866a39cc9e66adf1297 Mon Sep 17 00:00:00 2001 From: donho Date: Sat, 5 Apr 2008 12:32:14 +0000 Subject: [PATCH] [BUG_FIXED] Fix the crash problem while the separator shortcut (if assigned) is triggered. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@161 f5eea248-9336-0410-98b8-ebc06183d4e3 --- .../src/MISC/PluginsManager/PluginsManager.h | 3 +- PowerEditor/src/Notepad_plus.cpp | 62 +------------------ 2 files changed, 3 insertions(+), 62 deletions(-) diff --git a/PowerEditor/src/MISC/PluginsManager/PluginsManager.h b/PowerEditor/src/MISC/PluginsManager/PluginsManager.h index d709dc0f..8df98604 100644 --- a/PowerEditor/src/MISC/PluginsManager/PluginsManager.h +++ b/PowerEditor/src/MISC/PluginsManager/PluginsManager.h @@ -75,7 +75,8 @@ public: void runPluginCommand(size_t i) { if (i < _pluginsCommands.size()) - _pluginsCommands[i]._pFunc(); + if (_pluginsCommands[i]._pFunc != NULL) + _pluginsCommands[i]._pFunc(); }; void runPluginCommand(const char *pluginName, int commandID) { diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index d8244ee8..85f74368 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3684,15 +3684,7 @@ void Notepad_plus::command(int id) } break; } -/* - case IDM_SETTING_HISTORY_DONT_CHECK : - { - NppGUI & nppgui = (NppGUI &)(pNppParam->getNppGUI()); - nppgui._checkHistoryFiles = !nppgui._checkHistoryFiles; - checkMenuItem(IDM_SETTING_HISTORY_DONT_CHECK, !nppgui._checkHistoryFiles); - break; - } -*/ + case IDM_SETTING_FILEASSOCIATION_DLG : { RegExtDlg regExtDlg; @@ -3710,43 +3702,7 @@ void Notepad_plus::command(int id) shortcutMapper.destroy(); break; } -/* - case IDM_SETTING_FILE_AUTODETECTION_ENABLE : - { - NppGUI & nppgui = (NppGUI &)(pNppParam->getNppGUI()); - nppgui._fileAutoDetection = cdEnabled; - break; - } - case IDM_SETTING_FILE_AUTODETECTION_DISABLE : - { - NppGUI & nppgui = (NppGUI &)(pNppParam->getNppGUI()); - nppgui._fileAutoDetection = cdDisabled; - break; - } - case IDM_SETTING_FILE_AUTODETECTION_ENABLESILENTLY : - { - NppGUI & nppgui = (NppGUI &)(pNppParam->getNppGUI()); - nppgui._fileAutoDetection = cdAutoUpdate; - break; - } - - case IDM_SETTING_TRAYICON : - { - NppGUI & nppgui = (NppGUI &)(pNppParam->getNppGUI()); - nppgui._isMinimizedToTray = !nppgui._isMinimizedToTray; - checkMenuItem(IDM_SETTING_TRAYICON, nppgui._isMinimizedToTray); - break; - } - - case IDM_SETTING_REMEMBER_LAST_SESSION : - { - NppGUI & nppgui = (NppGUI &)(pNppParam->getNppGUI()); - nppgui._rememberLastSession = !nppgui._rememberLastSession; - checkMenuItem(IDM_SETTING_REMEMBER_LAST_SESSION, nppgui._rememberLastSession); - break; - } -*/ case IDM_SETTING_PREFERECE : { bool isFirstTime = !_preference.isCreated(); @@ -4125,23 +4081,7 @@ void Notepad_plus::command(int id) //changeDlgLang(_windowsDlg.getHSelf(), "Window"); } break; -/* - case IDC_KEY_HOME : - _pEditView->execute(SCI_VCHOMEWRAP); - break; - case IDC_KEY_END : - _pEditView->execute(SCI_LINEENDWRAP); - break; - - case IDC_KEY_SELECT_2_HOME : - _pEditView->execute(SCI_VCHOMEWRAPEXTEND); - break; - - case IDC_KEY_SELECT_2_END : - _pEditView->execute(SCI_LINEENDWRAPEXTEND); - break; -*/ default : if (id > IDM_FILE_EXIT && id < (IDM_FILE_EXIT + _lastRecentFileList.getMaxNbLRF() + 1)) {