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 13, 2018
1 parent 7fd6a20 commit 14e59ee6e7fe7996708fd1d5b05891ee77544de1
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/qgsreadwritelocker.cpp
@@ -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 14e59ee

Please sign in to comment.
You can’t perform that action at this time.