mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-06-19 13:19:40 -04:00
Fix crash when closing windows via the X title bar button
On OSX clicking the X title bar button immediately destroys "all" native windows (after sending a close event) which causes [NSSurface _disposeSurface] to crash if invoked while GL is using the surface
This commit is contained in:
@@ -539,8 +539,13 @@ void OBSBasic::ResizePreview(uint32_t cx, uint32_t cy)
|
||||
|
||||
void OBSBasic::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
/* TODO */
|
||||
UNUSED_PARAMETER(event);
|
||||
QWidget::closeEvent(event);
|
||||
if (!event->isAccepted())
|
||||
return;
|
||||
|
||||
// remove draw callback in case our drawable surfaces go away before
|
||||
// the destructor gets called
|
||||
obs_remove_draw_callback(OBSBasic::RenderMain, this);
|
||||
}
|
||||
|
||||
void OBSBasic::changeEvent(QEvent *event)
|
||||
|
||||
Reference in New Issue
Block a user