diff --git a/components/codetools/examples/methodjumping.lpi b/components/codetools/examples/methodjumping.lpi
index 4676efc0e0..fa67d53688 100644
--- a/components/codetools/examples/methodjumping.lpi
+++ b/components/codetools/examples/methodjumping.lpi
@@ -6,12 +6,12 @@
+
-
diff --git a/components/codetools/examples/methodjumping.pas b/components/codetools/examples/methodjumping.pas
index 311606cad8..2fcc8c8935 100644
--- a/components/codetools/examples/methodjumping.pas
+++ b/components/codetools/examples/methodjumping.pas
@@ -37,10 +37,12 @@ var
NewX, NewY, NewTopLine: integer;
RevertableJump: boolean;
begin
- ExpandedFilename:=ExpandFileName('tgeneric2.pp');
+ ExpandedFilename:=ExpandFileName('scanexamples/tgeneric2.pas');
CodeBuf:=CodeToolBoss.LoadFile(ExpandedFilename,true,false);
+ if CodeBuf=nil then
+ raise Exception.Create('failed loading '+ExpandedFilename);
if CodeToolBoss.JumpToMethod(CodeBuf,3,15,NewCode,NewX,NewY,NewTopLine,
- RevertableJump)
+ RevertableJump)
then
writeln(NewCode.Filename,' ',NewX,',',NewY,' TopLine=',NewTopLine,
' RevertableJump=',RevertableJump)