From 63ca449ac0b894e15b2a816798c33e8a337114cc Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Sat, 20 Apr 2013 21:45:29 +0800 Subject: [PATCH] Check null pointer before using Signed-off-by: Sup Yut Sum --- src/Utils/MiscUI/HistoryCombo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Utils/MiscUI/HistoryCombo.cpp b/src/Utils/MiscUI/HistoryCombo.cpp index 45d62cad0..bd7a2ceaf 100644 --- a/src/Utils/MiscUI/HistoryCombo.cpp +++ b/src/Utils/MiscUI/HistoryCombo.cpp @@ -70,7 +70,9 @@ BOOL CHistoryCombo::PreTranslateMessage(MSG* pMsg) if (nVirtKey == 'A' && (GetKeyState(VK_CONTROL) & 0x8000 ) ) { - GetEditCtrl()->SetSel(0, -1); + CEdit *edit = GetEditCtrl(); + if (edit) + edit->SetSel(0, -1); return TRUE; } } -- 2.11.4.GIT