mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Use sendPostedEvents with deleteLater events on destroy
On destruction of the window, send remaining QEvent::DeferredDelete events just to ensure there are no lingering actions remaining in the queue. May cause additional events to be posted, which should be covered by the final sendPostedEvents call. (Jim note: I admit this is probably unnecessary, and this may be redundant, but the reason such redundant precaution is being taken is because we want to make sure that browser panels in particular are properly cleaned up. To be quite frank I'm adding this mostly out of paranoia.)
This commit is contained in:
parent
fb58e58892
commit
8bff191b32
|
@ -2555,6 +2555,7 @@ OBSBasic::~OBSBasic()
|
|||
{
|
||||
/* clear out UI event queue */
|
||||
QApplication::sendPostedEvents(nullptr);
|
||||
QApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
|
||||
|
||||
if (updateCheckThread && updateCheckThread->isRunning())
|
||||
updateCheckThread->wait();
|
||||
|
|
Loading…
Reference in a new issue