mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Bug [0000532] "Access Violation on entering invalid DC command in column customization"
This commit is contained in:
parent
d7d5ea2e73
commit
1ecfdbfe2c
1 changed files with 10 additions and 4 deletions
|
|
@ -165,6 +165,7 @@ end;
|
|||
|
||||
function FormatFileFunction(FuncS: String; AFile: TFile; const AFileSource: IFileSource; RetrieveProperties: Boolean = False): String;
|
||||
var
|
||||
AIndex: Integer;
|
||||
AType, AName, AFunc, AParam: String;
|
||||
FileFunction: TFileFunction;
|
||||
FilePropertiesNeeded: TFilePropertiesTypes;
|
||||
|
|
@ -180,7 +181,9 @@ begin
|
|||
//------------------------------------------------------
|
||||
if AType = sFuncTypeDC then
|
||||
begin
|
||||
FileFunction:= TFileFunction(FileFunctionsStr.IndexOfName(AFunc));
|
||||
AIndex:= FileFunctionsStr.IndexOfName(AFunc);
|
||||
if AIndex < 0 then Exit;
|
||||
FileFunction:= TFileFunction(AIndex);
|
||||
// Retrieve additional properties if needed
|
||||
if RetrieveProperties then
|
||||
begin
|
||||
|
|
@ -326,6 +329,7 @@ end;
|
|||
|
||||
function GetFileFunctionByName(FuncS: String): TFileFunction;
|
||||
var
|
||||
AIndex: Integer;
|
||||
AType, AFunc: String;
|
||||
begin
|
||||
AType := UpCase(GetModType(FuncS));
|
||||
|
|
@ -333,9 +337,11 @@ begin
|
|||
|
||||
// Only internal DC functions.
|
||||
if AType = sFuncTypeDC then
|
||||
Result := TFileFunction(FileFunctionsStr.IndexOfName(AFunc))
|
||||
else
|
||||
Result := fsfInvalid;
|
||||
begin
|
||||
AIndex := FileFunctionsStr.IndexOfName(AFunc);
|
||||
if AIndex >= 0 then Exit(TFileFunction(AIndex));
|
||||
end;
|
||||
Result := fsfInvalid;
|
||||
end;
|
||||
|
||||
procedure FillContentFieldMenu(MenuItem: TMenuItem; OnMenuItemClick: TNotifyEvent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue