Browse Source

* Correct DefaultHandler/DeefaultHandlerStr

michael 6 years ago
parent
commit
8a3692b9fd
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/rtl/system.pas

+ 3 - 3
packages/rtl/system.pas

@@ -975,7 +975,7 @@ begin
   Id:=Msg['MsgStr'];
   if not isString(Id) then exit;
   aClass:=ClassType;
-  while aClass<>nil do
+  while (aClass<>Nil) do
     begin
     asm
       var Handlers = aClass.$msgstr;
@@ -991,12 +991,12 @@ end;
 
 procedure TObject.DefaultHandler(var aMessage);
 begin
-  if jsvalue(aMessage) then ;
+  if jsvalue(TMethod(aMessage)) then ;
 end;
 
 procedure TObject.DefaultHandlerStr(var aMessage);
 begin
-  if jsvalue(aMessage) then ;
+  if jsvalue(TMethod(aMessage)) then ;
 end;
 
 function TObject.GetInterface(const iid: TGuid; out obj): boolean;