Henri Verbeet : comctl32: Return if there' s no current selection in TAB_EnsureSelectionVisible().
Alexandre Julliard
julliard at winehq.org
Tue Apr 26 11:35:42 CDT 2011
Module: wine
Branch: master
Commit: 5ce31867355ed197e06145a53c4e5150a6a7386b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5ce31867355ed197e06145a53c4e5150a6a7386b
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Apr 25 22:54:11 2011 +0200
comctl32: Return if there's no current selection in TAB_EnsureSelectionVisible().
---
dlls/comctl32/tab.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index a9a0548..bd34358 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -2440,6 +2440,9 @@ static void TAB_EnsureSelectionVisible(
INT iSelected = infoPtr->iSelected;
INT iOrigLeftmostVisible = infoPtr->leftmostVisible;
+ if (iSelected < 0)
+ return;
+
/* set the items row to the bottommost row or topmost row depending on
* style */
if ((infoPtr->uNumRows > 1) && !(infoPtr->dwStyle & TCS_BUTTONS))
@@ -2504,7 +2507,7 @@ static void TAB_EnsureSelectionVisible(
if (infoPtr->leftmostVisible >= iSelected)
{
- if (iSelected >= 0) infoPtr->leftmostVisible = iSelected;
+ infoPtr->leftmostVisible = iSelected;
}
else
{
More information about the wine-cvs
mailing list