Skip to content

Commit 669f06e

Browse files
committed
Use XDECREF where it is potentially unsafe to use normal DECREF
1 parent 0a65766 commit 669f06e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src_c/mixer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ endsound_callback(int channel)
299299
PyGILState_STATE gstate = PyGILState_Ensure();
300300
int channelnum;
301301
Mix_Chunk *sound = pgSound_AsChunk(channeldata[channel].queue);
302-
Py_DECREF(channeldata[channel].sound);
302+
Py_XDECREF(channeldata[channel].sound);
303303
channeldata[channel].sound = channeldata[channel].queue;
304304
channeldata[channel].queue = NULL;
305305
PyGILState_Release(gstate);
@@ -310,7 +310,7 @@ endsound_callback(int channel)
310310
}
311311
else {
312312
PyGILState_STATE gstate = PyGILState_Ensure();
313-
Py_DECREF(channeldata[channel].sound);
313+
Py_XDECREF(channeldata[channel].sound);
314314
channeldata[channel].sound = NULL;
315315
PyGILState_Release(gstate);
316316
Mix_GroupChannel(channel, -1);

0 commit comments

Comments
 (0)