Quellcode durchsuchen

* pas2jni: Return null if a method pointer is empty.

git-svn-id: trunk@41374 -
yury vor 6 Jahren
Ursprung
Commit
f7f1286e51
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  1. 2 0
      utils/pas2jni/writer.pas

+ 2 - 0
utils/pas2jni/writer.pas

@@ -1853,6 +1853,8 @@ begin
       Fps.WriteLn('var mpi: _TMethodPtrInfo;');
       Fps.WriteLn('begin');
       Fps.IncI;
+      Fps.WriteLn('Result:=nil;');
+      Fps.WriteLn('if (m.Data = nil) and (m.Code = nil) then exit;');
       Fps.WriteLn('_MethodPointersCS.Enter;');
       Fps.WriteLn('try');
       Fps.IncI;