瀏覽代碼

UI: Enter graphics context before destroying texture

Fixes a memory leak where the texture would not be properly freed.
jp9000 6 年之前
父節點
當前提交
53ba6c0350
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      UI/window-basic-preview.cpp

+ 2 - 0
UI/window-basic-preview.cpp

@@ -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();
 	}
 }