diff options
| author | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-09-19 15:20:01 +0200 |
|---|---|---|
| committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-09-19 14:47:18 +0000 |
| commit | 516156d24e334ab909a16f866832204b9650ab42 (patch) | |
| tree | e647a09a864f57bc67fd56acd44340ae89a28410 /doc/codesnippets/snippets/textdocument-resources/main.cpp | |
| parent | 3eb940cbd77cea9603d1c180f81eb4a2a474ef90 (diff) | |
GlobalReceiverV2: Fix double delete of receivers on exit
When SignalManager is being destructed and calls qDeleteAll on the
map of global receivers, a deletion of one receiver might indirectly
cause another receiver to be deleted. This will cause a double
delete when qDeleteAll tries to delete the already deleted second
receiver.
Fix this by deleting the first map element in a loop while the map
is not empty. This makes sure that if an indirect delete does happen,
it won't invalidate any iterator, because we call begin() again to
get a new iterator.
Task-number: PYSIDE-88
Change-Id: I9e812271c1a86607094006bc01eb55c930d7fa95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'doc/codesnippets/snippets/textdocument-resources/main.cpp')
0 files changed, 0 insertions, 0 deletions
