diff --git a/ide/newdialog.pas b/ide/newdialog.pas index 2d9a79f881..619c5e39ba 100644 --- a/ide/newdialog.pas +++ b/ide/newdialog.pas @@ -190,6 +190,9 @@ var AnUnitInfo: TUnitInfo; InhCompItem: TFileDescInheritedComponent; begin + if not ButtonPanel.OKButton.IsEnabled then + exit; + ANode := ItemsTreeView.Selected; if (ANode = nil) or (ANode.Data = nil) or (not (TObject(ANode.Data) is TNewIDEItemTemplate)) then