Skip to content

Commit

Permalink
Merge pull request #5 from Hagbard-Celin/patch-1
Browse files Browse the repository at this point in the history
Fix memleak on non-icon drag in drag_routines.c with custom dragging …
  • Loading branch information
mheyer32 authored Mar 27, 2024
2 parents 0292930 + 5828b66 commit 407be44
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source/Library/drag_routines.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,14 @@ void LIBFUNC L_AddDragImage(REG(a0, DragInfo *drag))
// If bob not visible, add to list
if (!(drag->flags & DRAGF_VALID))
{
AddBob(&drag->bob, drag->rastport);
if (!(drag->flags&DRAGF_CUSTOM))
{
AddBob(&drag->bob,drag->rastport);
}
else
{
AddVSprite(&drag->sprite, drag->rastport);
}
drag->flags |= DRAGF_VALID;
}
}
Expand Down

0 comments on commit 407be44

Please sign in to comment.