diff --git a/obs/window-basic-filters.cpp b/obs/window-basic-filters.cpp index e9eabd45e..2eeb437c2 100644 --- a/obs/window-basic-filters.cpp +++ b/obs/window-basic-filters.cpp @@ -394,6 +394,9 @@ void OBSBasicFilters::closeEvent(QCloseEvent *event) if (!event->isAccepted()) return; + obs_display_remove_draw_callback (ui->preview->GetDisplay(), + OBSBasicFilters::DrawPreview, this); + main->SaveProject(); } diff --git a/obs/window-basic-interaction.cpp b/obs/window-basic-interaction.cpp index e1585f053..a0265fc15 100644 --- a/obs/window-basic-interaction.cpp +++ b/obs/window-basic-interaction.cpp @@ -168,6 +168,9 @@ void OBSBasicInteraction::closeEvent(QCloseEvent *event) width()); config_set_int(App()->GlobalConfig(), "InteractionWindow", "cy", height()); + + obs_display_remove_draw_callback(ui->preview->GetDisplay(), + OBSBasicInteraction::DrawPreview, this); } static int TranslateQtKeyboardEventModifiers(QInputEvent *event, bool mouseEvent) { diff --git a/obs/window-basic-properties.cpp b/obs/window-basic-properties.cpp index 4594b0006..2fad427da 100644 --- a/obs/window-basic-properties.cpp +++ b/obs/window-basic-properties.cpp @@ -205,6 +205,9 @@ void OBSBasicProperties::Cleanup() width()); config_set_int(App()->GlobalConfig(), "PropertiesWindow", "cy", height()); + + obs_display_remove_draw_callback(preview->GetDisplay(), + OBSBasicProperties::DrawPreview, this); } void OBSBasicProperties::reject()