From 51d31bea7183719ca4384a40fddf2b589fbb909e Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 24 Jul 2012 16:57:47 +0000 Subject: [PATCH] IDEIntf: simplification git-svn-id: trunk@38033 - --- ideintf/propedits.pp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ideintf/propedits.pp b/ideintf/propedits.pp index 17bd604a9e..e73685de7e 100644 --- a/ideintf/propedits.pp +++ b/ideintf/propedits.pp @@ -6079,17 +6079,11 @@ begin end; function GetClassUnitName(Value: TClass): string; -var - TheTypeInfo: PTypeInfo; - TheTypeData: PTypeData; begin - Result:=''; - TheTypeInfo:=ClassTypeInfo(Value); - if TheTypeInfo=nil then exit; - TheTypeData:=GetTypeData(TheTypeInfo); - if TheTypeData=nil then exit; - Result:=TheTypeData^.UnitName; - //debugln('GetClassUnitName A Result="',Result,'"'); + if Value=nil then + Result:='' + else + Result:=Value.UnitName; end; procedure CreateComponentEvent(AComponent: TComponent; const EventName: string);