Don't crash when clicking on the little empty in the windows 7 thumbbar. Fixes issue 2615

This commit is contained in:
David Sansome 2012-01-29 15:46:10 +00:00
parent ad3483e86a
commit 9387b4c40b

View File

@ -135,8 +135,10 @@ void Windows7ThumbBar::HandleWinEvent(MSG* msg) {
const int button_id = LOWORD(msg->wParam);
if (button_id >= 0 && button_id < actions_.count()) {
qLog(Debug) << "Button activated";
actions_[button_id]->activate(QAction::Trigger);
if (actions_[button_id]) {
qLog(Debug) << "Button activated";
actions_[button_id]->activate(QAction::Trigger);
}
}
}
#endif // Q_OS_WIN32