From 7874c0aac58554096bade7355fe99a2a12492030 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Thu, 17 Nov 2011 12:47:58 +0000 Subject: [PATCH] customdrawn: Fixes an exception by an extra index check when clicking in a tab git-svn-id: trunk@33582 - --- components/customdrawn/customdrawncontrols.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/customdrawn/customdrawncontrols.pas b/components/customdrawn/customdrawncontrols.pas index e57939a009..1b72734848 100644 --- a/components/customdrawn/customdrawncontrols.pas +++ b/components/customdrawn/customdrawncontrols.pas @@ -2105,7 +2105,7 @@ begin end; end // Check if a close button was clicked - else if (nboShowCloseButtons in Options) then + else if (nboShowCloseButtons in Options) and (lTabIndex >= 0) then begin FTabCState.CurTabIndex := lTabIndex; lCloseButtonPos.X := FDrawer.GetMeasuresEx(Canvas, TCDCTABCONTROL_CLOSE_BUTTON_POS_X, FState, FStateEx);