[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble/src/lib/geodata/data
From:       Bastian Holst <bastianholst () gmx ! de>
Date:       2010-05-21 21:13:15
Message-ID: 20100521211315.6EDB7AC8C3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1129289 by bholst:

GeoDataRegion assignment operator now threadsafe.

 M  +5 -0      GeoDataRegion.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataRegion.cpp #1129288:1129289
@@ -152,7 +152,12 @@
 
 GeoDataRegion &GeoDataRegion::operator=( const GeoDataRegion& other )
 {
+    // Self assignment
+    if ( this == &other ) return *this;
+
+    other.d->m_mutex.lock();
     GeoDataRegion temp( other );
+    other.d->m_mutex.unlock();
     swap( temp );
     return *this;
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic