Skip to content

Commit

Permalink
Merge pull request #308 from cjwatson/event-filter-refcount
Browse files Browse the repository at this point in the history
Fix reference-counting in set_event_filter
  • Loading branch information
dod38fr authored Feb 16, 2025
2 parents 2a7866f + fbf151a commit 09af9aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core/Events.xs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ void
events_set_event_filter(callback)
SV* callback
CODE:
eventfiltersv = callback;
SvREFCNT_dec(eventfiltersv);
eventfiltersv = SvREFCNT_inc_simple(callback);
SDL_SetEventFilter((SDL_EventFilter) eventfilter_cb);

AV *
Expand Down

0 comments on commit 09af9aa

Please sign in to comment.