Skip to content
Permalink
Browse files

Fix crash when concurrent rendering operations occur

  • Loading branch information
nyalldawson committed Mar 1, 2017
1 parent 809d30f commit f354a8560b27506bc426413bd97f9798f4c605e0
Showing with 29 additions and 0 deletions.
  1. +22 −0 src/core/qgspropertycollection.cpp
  2. +7 −0 src/core/qgspropertycollection.h
@@ -96,6 +96,28 @@ QgsPropertyCollection::QgsPropertyCollection( const QString& name )
, mHasDynamicProperties( false )
{}

QgsPropertyCollection::QgsPropertyCollection( const QgsPropertyCollection& other )
: QgsAbstractPropertyCollection( other )
, mProperties( other.mProperties )
, mDirty( other.mDirty )
, mHasActiveProperties( other.mHasActiveProperties )
, mHasDynamicProperties( other.mHasDynamicProperties )
, mCount( other.mCount )
{
mProperties.detach();
}

QgsPropertyCollection&QgsPropertyCollection::operator=( const QgsPropertyCollection & other )
{
mProperties = other.mProperties;
mProperties.detach();
mDirty = other.mDirty;
mHasActiveProperties = other.mHasActiveProperties;
mHasDynamicProperties = other.mHasDynamicProperties;
mCount = other.mCount;
return *this;
}

int QgsPropertyCollection::count() const
{
if ( !mDirty )
@@ -260,6 +260,13 @@ class CORE_EXPORT QgsPropertyCollection : public QgsAbstractPropertyCollection
*/
QgsPropertyCollection( const QString& name = QString() );

/**
* Copy constructor.
*/
QgsPropertyCollection( const QgsPropertyCollection& other );

QgsPropertyCollection& operator=( const QgsPropertyCollection& other );

/**
* Returns the number of properties contained within the collection.
*/

0 comments on commit f354a85

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