1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-10-30 23:07:52 +02:00

Removed unused interface and more pointer checks

This commit is contained in:
Salvador Díaz Fau
2017-10-02 17:56:56 +02:00
parent 045fe07e74
commit 659092bb37
8 changed files with 117 additions and 92 deletions

View File

@@ -271,8 +271,13 @@ end;
function CefGetObject(ptr: Pointer): TObject; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}
begin
Dec(PByte(ptr), SizeOf(Pointer));
Result := TObject(PPointer(ptr)^);
if (ptr <> nil) then
begin
Dec(PByte(ptr), SizeOf(Pointer));
Result := TObject(PPointer(ptr)^);
end
else
Result := nil;
end;
function CefGetData(const i: ICefBaseRefCounted): Pointer; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF}