Просмотр исходного кода

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 лет назад
Родитель
Сommit
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());