Changeset - dd9f9c48e1ed
[Not reviewed]
0 1 0
Jan Kaluza - 13 years ago 2012-07-16 14:38:52
hanzz.k@gmail.com
Do not try to store buddies with empty name and clear m_buddies after storing
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/rosterstorage.cpp
Show inline comments
 
@@ -86,6 +86,13 @@ RosterStorage::~RosterStorage() {
 
}
 

	
 
void RosterStorage::storeBuddy(Buddy *buddy) {
 
	if (!buddy) {
 
		return;
 
	}
 
	if (buddy->getName().empty()) {
 
		return;
 
	}
 

	
 
	m_buddies[buddy->getName()] = buddy;
 
	m_storageTimer->start();
 
}
 
@@ -129,6 +136,7 @@ bool RosterStorage::storeBuddies() {
 
// 		}
 
	}
 

	
 
	m_buddies.clear();
 
	m_storageBackend->commitTransaction();
 
	return true;
 
}
0 comments (0 inline, 0 general)