mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +00:00
Fix crash when clicking outside any button
svn path=/trunk/; revision=7630
This commit is contained in:
parent
95adb6598c
commit
89cfa2f16d
|
@ -5042,6 +5042,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
if((infoPtr->nHotItem >= 0) && (nHit != -1))
|
if((infoPtr->nHotItem >= 0) && (nHit != -1))
|
||||||
infoPtr->buttons[infoPtr->nHotItem].bHot = TRUE;
|
infoPtr->buttons[infoPtr->nHotItem].bHot = TRUE;
|
||||||
|
|
||||||
|
if (0 <= infoPtr->nButtonDown) {
|
||||||
btnPtr = &infoPtr->buttons[infoPtr->nButtonDown];
|
btnPtr = &infoPtr->buttons[infoPtr->nButtonDown];
|
||||||
btnPtr->fsState &= ~TBSTATE_PRESSED;
|
btnPtr->fsState &= ~TBSTATE_PRESSED;
|
||||||
|
|
||||||
|
@ -5111,6 +5112,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
nmmouse.dwItemData = btnPtr->dwData;
|
nmmouse.dwItemData = btnPtr->dwData;
|
||||||
TOOLBAR_SendNotify ((NMHDR *) &nmmouse, infoPtr, NM_CLICK);
|
TOOLBAR_SendNotify ((NMHDR *) &nmmouse, infoPtr, NM_CLICK);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue