Browse Source

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 years ago
parent
commit
c5fdaef450
1 changed files with 3 additions and 2 deletions
  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());