Skip to content

Fix crash in QCoroSignal when signal is received after destruction#168

Merged
danvratil merged 1 commit intomainfrom
167-qcorosignal-crashes
Apr 15, 2023
Merged

Fix crash in QCoroSignal when signal is received after destruction#168
danvratil merged 1 commit intomainfrom
167-qcorosignal-crashes

Conversation

@danvratil
Copy link
Collaborator

When there's a signal emission pending while QCoroSignal is destroyed, it will still get delivered, but the this pointer is already destroyed, which leads to a crash.

This is fixed by using a dedicated QObject as the signal receiver when setting up the connection which is destroyed with the QCoroSignal.

Fixes #167.

When there's a signal emission pending while QCoroSignal is destroyed,
it will still get delivered, but the this pointer is already destroyed,
which leads to a crash.

This is fixed by using a dedicated QObject as the signal receiver when
setting up the connection which is destroyed with the QCoroSignal.

Fixes #167.
@danvratil danvratil linked an issue Apr 15, 2023 that may be closed by this pull request
@danvratil danvratil merged commit 4b52e1d into main Apr 15, 2023
@danvratil danvratil deleted the 167-qcorosignal-crashes branch April 15, 2023 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QCoroSignal crashes

1 participant