mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-22 13:18:34 -05:00
UI: Fix crash at render_display while shutdown on macOS
The display context was sometimes created again by a resize event after destruction from `OBSBasic::closeEvent`. That resulted in the display context alive until reaching the destructor of the `OBSQTDisplay` class and caused a crash in `render_display` on macOS. To avoid this, destroy the display context at the event `SurfaceAboutToBeDestroyed` and let not create the display context again.
This commit is contained in:
@@ -5154,10 +5154,6 @@ void OBSBasic::closeEvent(QCloseEvent *event)
|
||||
|
||||
delete extraBrowsers;
|
||||
|
||||
ui->preview->DestroyDisplay();
|
||||
if (program)
|
||||
program->DestroyDisplay();
|
||||
|
||||
config_set_string(App()->GlobalConfig(), "BasicWindow", "DockState",
|
||||
saveState().toBase64().constData());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user