diff options
Diffstat (limited to 'src/unstable')
-rw-r--r-- | src/unstable/cachebase.h | 7 | ||||
-rw-r--r-- | src/unstable/uuid.cpp | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/unstable/cachebase.h b/src/unstable/cachebase.h index 6cc3e77..af2884c 100644 --- a/src/unstable/cachebase.h +++ b/src/unstable/cachebase.h | |||
@@ -184,7 +184,8 @@ namespace Bu | |||
184 | pEnt( rhs.pEnt ), | 184 | pEnt( rhs.pEnt ), |
185 | pData( rhs.pData ) | 185 | pData( rhs.pData ) |
186 | { | 186 | { |
187 | pEnt->incRef(); | 187 | if( pEnt ) |
188 | pEnt->incRef(); | ||
188 | } | 189 | } |
189 | 190 | ||
190 | virtual ~CachePtr() | 191 | virtual ~CachePtr() |
@@ -228,7 +229,8 @@ namespace Bu | |||
228 | kId = rhs.kId; | 229 | kId = rhs.kId; |
229 | pEnt = rhs.pEnt; | 230 | pEnt = rhs.pEnt; |
230 | pData = rhs.pData; | 231 | pData = rhs.pData; |
231 | pEnt->incRef(); | 232 | if( pEnt ) |
233 | pEnt->incRef(); | ||
232 | 234 | ||
233 | return *this; | 235 | return *this; |
234 | } | 236 | } |
@@ -513,6 +515,7 @@ namespace Bu | |||
513 | Entry *pEnt = hCacheEntry.get( i.getKey() ); | 515 | Entry *pEnt = hCacheEntry.get( i.getKey() ); |
514 | Bu::MutexLocker ml( pEnt->getMutex() ); | 516 | Bu::MutexLocker ml( pEnt->getMutex() ); |
515 | _save( pEnt->getPtr() ); | 517 | _save( pEnt->getPtr() ); |
518 | pEnt->getPtr()->changed( false ); | ||
516 | } | 519 | } |
517 | hChanged.clear(); | 520 | hChanged.clear(); |
518 | } | 521 | } |
diff --git a/src/unstable/uuid.cpp b/src/unstable/uuid.cpp index a93f713..304ea4a 100644 --- a/src/unstable/uuid.cpp +++ b/src/unstable/uuid.cpp | |||
@@ -77,6 +77,7 @@ int Bu::Uuid::getVersion() | |||
77 | 77 | ||
78 | void Bu::Uuid::clear() | 78 | void Bu::Uuid::clear() |
79 | { | 79 | { |
80 | memset( data, 0, 16 ); | ||
80 | data[7] = msb(0); | 81 | data[7] = msb(0); |
81 | } | 82 | } |
82 | 83 | ||