Explorar el Código

UI: Enter graphics context before destroying texture

Fixes a memory leak where the texture would not be properly freed.
jp9000 hace 7 años
padre
commit
53ba6c0350
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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();
 	}
 }