Skip to content

Commit

Permalink
Fix memlaek on non-icon drag in drag_routines.c with custom dragging …
Browse files Browse the repository at this point in the history
…enabled

I just mirrored part of what was done in commit b0799cd. This seems to work after a quick test.
  • Loading branch information
Hagbard-Celin authored Oct 30, 2023
1 parent 0292930 commit 5828b66
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 5828b66

Please sign in to comment.