浏览代码

Fix crash when closing the properties window on OSX

Followup to d56432304e6e8ae00ea66bef8c1847894e5cac9f, it apparently
still crashed (on slower machines?) when closing the properties window
via mouse (by clicking the X button)
Palana 11 年之前
父节点
当前提交
c5fdaef450
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      obs/window-basic-properties.cpp

+ 3 - 2
obs/window-basic-properties.cpp

@@ -145,10 +145,11 @@ void OBSBasicProperties::closeEvent(QCloseEvent *event)
 	if (!event->isAccepted())
 		return;
 
-	// remove draw callback in case our drawable surfaces go away before
-	// the destructor gets called
+	// remove draw callback and release display in case our drawable
+	// surfaces go away before the destructor gets called
 	obs_display_remove_draw_callback(display,
 			OBSBasicProperties::DrawPreview, this);
+	display = nullptr;
 
 	config_set_int(App()->GlobalConfig(), "PropertiesWindow", "cx",
 			width());