Skip to content
Permalink
Browse files
Fix QgsReadWriteLocker changeMode
since mMode was never updated, the lock
was never toggled from read to write or
vice-versa.

This was leading to crashes because the
paths that were meant to be serialized
and thread safe were not.

Fixes #20789 and probably many more
random crashes where QgsFeaturePool
was used.
  • Loading branch information
elpaso committed Dec 12, 2018
1 parent 6de0160 commit b0d1506
Showing 1 changed file with 2 additions and 0 deletions.
@@ -34,6 +34,8 @@ void QgsReadWriteLocker::changeMode( QgsReadWriteLocker::Mode mode )

unlock();

mMode = mode;

if ( mMode == Read )
mLock.lockForRead();
else if ( mMode == Write )

0 comments on commit b0d1506

Please sign in to comment.