mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-03 03:49:35 +01:00
LCL: TCustomNotebook: ignore selchange events when destroying handle
git-svn-id: trunk@18358 -
This commit is contained in:
parent
f96550f8e2
commit
17daa1d3ef
@ -794,7 +794,9 @@ begin
|
||||
TCN_SELCHANGE:
|
||||
begin
|
||||
// set the page from the NMHDR^.idfrom
|
||||
if (not fAddingPages) then begin
|
||||
if (not fAddingPages) and not
|
||||
(csDestroyingHandle in ControlState) then
|
||||
begin
|
||||
OldPageIndex:=FPageIndex;
|
||||
FPageIndex := NMHDR^.idfrom;
|
||||
if FPageIndex>=PageCount then
|
||||
@ -814,7 +816,8 @@ begin
|
||||
end;
|
||||
TCN_SELCHANGING:
|
||||
begin
|
||||
if CanChangePageIndex then
|
||||
if CanChangePageIndex and not
|
||||
(csDestroyingHandle in ControlState) then
|
||||
Result := 0
|
||||
else
|
||||
Result := 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user