From 64c1e8d19c018a455c3b057158383a45c46b6380 Mon Sep 17 00:00:00 2001 From: "auria.mg" Date: Wed, 30 Aug 2017 20:39:20 -0400 Subject: [PATCH] Fix SFX leaks --- src/items/powerup.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/items/powerup.cpp b/src/items/powerup.cpp index ca669e551..c1572f7fc 100644 --- a/src/items/powerup.cpp +++ b/src/items/powerup.cpp @@ -325,6 +325,11 @@ void Powerup::use() } } + if (m_sound_use != NULL) + { + m_sound_use->deleteSFX(); + m_sound_use = NULL; + } m_sound_use = SFXManager::get()->createSoundSource("inflate");//Extraordinary. Usually sounds are set in Powerup::set() //In this case this is a workaround, since the bubblegum item has two different sounds.