UI: Enter graphics context before destroying texture

Fixes a memory leak where the texture would not be properly freed.
This commit is contained in:
jp9000 2019-02-10 18:13:21 -08:00
parent 2a92555f58
commit 53ba6c0350

View File

@ -29,7 +29,9 @@ OBSBasicPreview::OBSBasicPreview(QWidget *parent, Qt::WindowFlags flags)
OBSBasicPreview::~OBSBasicPreview()
{
if (overflow) {
obs_enter_graphics();
gs_texture_destroy(overflow);
obs_leave_graphics();
}
}