提交 ccf36b68 编写于 作者: R Richard Stanway

obs: Remove draw callbacks when closing various windows

Fixes a race condition during shutdown where the dialogs aren't deleted
before another render attempt occurs, by which time the sources are
already freed, resulting in a crash.
上级 92af243a
......@@ -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();
}
......
......@@ -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) {
......
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册