mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-10 00:13:55 -04:00
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.
This commit is contained in:
parent
6de0160fb5
commit
b0d1506b72
@ -34,6 +34,8 @@ void QgsReadWriteLocker::changeMode( QgsReadWriteLocker::Mode mode )
|
||||
|
||||
unlock();
|
||||
|
||||
mMode = mode;
|
||||
|
||||
if ( mMode == Read )
|
||||
mLock.lockForRead();
|
||||
else if ( mMode == Write )
|
||||
|
Loading…
x
Reference in New Issue
Block a user