UI: Fix crash in advanced audio settings

Delete source controls when the settings window is deleted.
This commit is contained in:
fryshorts 2015-02-13 12:41:12 +01:00
parent 6099c65ff7
commit c45e74039f
2 changed files with 7 additions and 0 deletions

View File

@ -82,6 +82,12 @@ OBSBasicAdvAudio::OBSBasicAdvAudio(QWidget *parent)
setAttribute(Qt::WA_DeleteOnClose, true);
}
OBSBasicAdvAudio::~OBSBasicAdvAudio()
{
for (size_t i = 0; i < controls.size(); ++i)
delete controls[i];
}
bool OBSBasicAdvAudio::EnumSources(void *param, obs_source_t *source)
{
OBSBasicAdvAudio *dialog = reinterpret_cast<OBSBasicAdvAudio*>(param);

View File

@ -33,4 +33,5 @@ public slots:
public:
OBSBasicAdvAudio(QWidget *parent);
~OBSBasicAdvAudio();
};