mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-20 20:25:00 -04: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:
@@ -626,11 +626,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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user