fixed releasing bitmap handle

git-svn-id: trunk@4344 -
This commit is contained in:
mattias 2003-06-30 15:13:21 +00:00
parent 568553d695
commit d817351985
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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;