Skip to content

Commit 646b770

Browse files
author
Joachim Marder
committed
Preventing possible AV in Register() function in case the RibbonDesginer path is yet unknown and there is no active project.
1 parent 7abb17a commit 646b770

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/UIRibbon.Register.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ procedure Register;
3131
RegisterActions(cPackageTitle, [TRibbonCollectionAction, TRibbonFontAction, TRibbonColorAction], nil);
3232

3333
lDesignerPath := TMyRibbonFrameworkEditor.GetDesignerPath();
34-
if lDesignerPath.IsEmpty then begin
34+
if lDesignerPath.IsEmpty and (getActiveProject <> nil) then begin
3535
// Search designer based on project path
3636
lDesignerPath := ExtractFilePath(ExcludeTrailingPathDelimiter(ExtractFilePath(getActiveProject.fileName)));
3737
lDesignerPath := IncludeTrailingPathDelimiter(lDesignerPath) + 'Designer\Bin\RibbonDesigner.exe';

0 commit comments

Comments
 (0)