diff --git a/lcl/include/page.inc b/lcl/include/page.inc index 57ac0a4c04..2fd6cc01e4 100644 --- a/lcl/include/page.inc +++ b/lcl/include/page.inc @@ -33,7 +33,7 @@ begin end; //if old and new parent is a TNotebook then remove the page from the old one - if OldParent is TNotebook and + if (OldParent is TNotebook) and not (csDestroying in OldParent.ComponentState) then begin // remove from old pagelist