From f7f1286e51ccfde3a67c164b9bc9886c2ba1f9f1 Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 18 Feb 2019 16:31:04 +0000 Subject: [PATCH] * pas2jni: Return null if a method pointer is empty. git-svn-id: trunk@41374 - --- utils/pas2jni/writer.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/pas2jni/writer.pas b/utils/pas2jni/writer.pas index 50fac101a7..f5baf8fb93 100644 --- a/utils/pas2jni/writer.pas +++ b/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;