Jump to content
shadowrecon

Noticed problem in DebugSMART

Recommended Posts

I was getting an error when using the SmartDebugText in a script and keep getting the cannot locate the DIB so i went back to the DebugSMART file and traced it back to the SmartDebugBitmap function and found in that function your not freeing BM2.

[scar]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure SmartDebugBitmap(BMP, X, Y: Integer);

Contributors: Wanted, Timer.

Description: Draws a bitmap on the smart debug canvas.

Date Created: January 22nd, 2012. By Wanted. RS2 Build 699.

Last Modified: January 22nd, 2012. By Wanted. RS2 Build 699.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure SmartDebugBitmap(BMP, X, Y: Integer);

var

Canvas, SCanvas: TCanvas;

BMP2, W, H: Integer;

begin

BMP2 := BitmapFromString(RSPW, RSPH, ''); // <--- this is never being free'ed

SCanvas := GetBitmapCanvas(BMP2);

SCanvas.Handle := SmartGetDebugDC;

Canvas := GetBitmapCanvas(BMP);

GetBitmapSize(BMP, W, H);

SafeCopyCanvas(Canvas, SCanvas, 0, 0, W, H, X, Y, X + W, Y + H);

end;

[/scar]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...