diff --git a/obs/window-basic-properties.cpp b/obs/window-basic-properties.cpp index eaefbb121c82ca0cfbf7dad82a7ad98da4c629f4..75a94612af3fc9ee2ff7fbfbd0ad582209f8b34f 100644 --- a/obs/window-basic-properties.cpp +++ b/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());