Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Source/uPSRuntime.pas
Original file line number Diff line number Diff line change
Expand Up @@ -11259,7 +11259,7 @@ function CastProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStac
if (IUnknown(invar.Dta^) = nil) or (IUnknown(invar.Dta^).QueryInterface(TPSTypeRec_Interface(ResVar.aType).Guid, IUnknown(resvar.Dta^)) <> 0) then
begin
Caller.CMD_Err2(erCustomError, tbtString(RPS_CannotCastInterface));
Result := False;
Result := True; // error already dispatched by CMD_Err2
exit;
end;
{$IFDEF Delphi3UP}
Expand All @@ -11273,7 +11273,7 @@ function CastProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStac
if (TObject(invar.Dta^)= nil) or (not TObject(invar.dta^).GetInterface(TPSTypeRec_Interface(ResVar.aType).Guid, IUnknown(resvar.Dta^))) then
begin
Caller.CMD_Err2(erCustomError, tbtString(RPS_CannotCastInterface));
Result := False;
Result := True; // error already dispatched by CMD_Err2
exit;
end;
{$ENDIF}
Expand Down Expand Up @@ -11303,8 +11303,8 @@ function CastProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStac
try
TObject(ResVar.Dta^) := TObject(InVar.Dta^) as FSelf;
except
Result := False;
Caller.CMD_Err2(erCustomError, tbtString(RPS_CannotCastObject));
Result := True; // error already dispatched by CMD_Err2
exit;
end;
end else
Expand Down