mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 05:20:36 +01:00
fixed releasing bitmap handle
git-svn-id: trunk@4344 -
This commit is contained in:
parent
568553d695
commit
d817351985
@ -613,8 +613,7 @@ begin
|
||||
end;
|
||||
// TODO: get the properties from new bitmap
|
||||
with FImage do begin
|
||||
if FHandle<>0 then
|
||||
writeln('WARNING: TBitmap.SetHandle OldHandle not freed');
|
||||
FreeHandle;
|
||||
FHandle:=Value;
|
||||
FillChar(FDIB, sizeof(FDIB), 0);
|
||||
if FHandle <> 0 then
|
||||
@ -712,6 +711,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.34 2003/06/30 15:13:21 mattias
|
||||
fixed releasing bitmap handle
|
||||
|
||||
Revision 1.33 2003/06/30 14:58:29 mattias
|
||||
implemented multi file add to package editor
|
||||
|
||||
|
||||
@ -74,6 +74,7 @@ begin
|
||||
end;
|
||||
|
||||
function TBitmapImage.ReleaseHandle: HBITMAP;
|
||||
// simply return the current handle and set to 0 without freeing handles
|
||||
begin
|
||||
Result:=FHandle;
|
||||
if FHandle = FDIBHandle then
|
||||
@ -81,6 +82,7 @@ begin
|
||||
FDIBHandle := 0;
|
||||
FDIB.dsbm.bmBits := nil;
|
||||
end;
|
||||
FHandle:=0;
|
||||
end;
|
||||
|
||||
function TBitmapImage.IsEmpty: boolean;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user