mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
UI: Fix handling of remove signal with projectors
Since the remove signal is coming from another thread, QMetaObject::invokeMethod has to be used, or corruption could possibly occur.
This commit is contained in:
parent
65a360fa41
commit
66341c7568
|
@ -665,11 +665,7 @@ void OBSProjector::OBSRender(void *data, uint32_t cx, uint32_t cy)
|
|||
void OBSProjector::OBSSourceRemoved(void *data, calldata_t *params)
|
||||
{
|
||||
OBSProjector *window = reinterpret_cast<OBSProjector *>(data);
|
||||
|
||||
OBSBasic *main = reinterpret_cast<OBSBasic *>(App()->GetMainWindow());
|
||||
main->DeleteProjector(window);
|
||||
allProjectors.removeAll(window);
|
||||
|
||||
QMetaObject::invokeMethod(window, "EscapeTriggered");
|
||||
UNUSED_PARAMETER(params);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue