Commit 41f54528 authored by Michael W. Vogel's avatar Michael W. Vogel
Browse files

LCL: TNoteBook: Fixed TNotebook fires OnBeforeShow for destroying pages. Issue...

LCL: TNoteBook: Fixed TNotebook fires OnBeforeShow for destroying pages. Issue #32863. Patch by Rik van Kekem

git-svn-id: trunk@56811 -
parent 2c51aaf2
......@@ -33,7 +33,8 @@ begin
end;
//if old and new parent is a TNotebook then remove the page from the old one
if (OldParent <> nil) and (OldParent is TNotebook) then
if (OldParent <> nil) and (OldParent is TNotebook) and
not (csDestroying in OldParent.ComponentState) then
begin
// remove from old pagelist
ParentNotebook := TNotebook(OldParent);
......@@ -63,7 +64,8 @@ begin
DebugLn('[TPage.Destroy]');
{$endif}
if (Parent <> nil) and (Parent is TNotebook) then
if (Parent <> nil) and (Parent is TNotebook) and
not (csDestroying in Parent.ComponentState) then
begin
{$ifdef DEBUG_NEW_NOTEBOOK}
DebugLn('[TPage.Destroy] FPages.Remove(Self)');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment