mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 17:39:23 +02:00
IDE: fixed crash on copying components with new methods, bug #13204
git-svn-id: trunk@20266 -
This commit is contained in:
parent
092056f390
commit
dcf8452b15
@ -1701,11 +1701,15 @@ begin
|
||||
// search in JIT method of stream class (e.g. ancestor)
|
||||
JITMethod:=JITMethods.Find(FCurReadStreamClass,TheMethodName);
|
||||
end;
|
||||
if JITMethod=nil then begin
|
||||
if (JITMethod=nil) and (Reader.LookupRoot<>nil) then begin
|
||||
// create a fake TJITMethod
|
||||
//DebugLn(['TJITComponentList.ReaderSetMethodProperty ',DbgSName(reader.LookupRoot),' TheMethodName=',TheMethodName]);
|
||||
JITMethod:=JITMethods.Add(Reader.LookupRoot.ClassType,TheMethodName);
|
||||
end;
|
||||
Method:=JITMethod.Method;
|
||||
if JITMethod<>nil then
|
||||
Method:=JITMethod.Method
|
||||
else
|
||||
Method.Data:=nil;
|
||||
end;
|
||||
SetMethodProp(Instance, PropInfo, Method);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user