Changeset - 2a8b02d1d4b1
[Not reviewed]
0 1 0
HanzZ - 12 years ago 2013-03-04 20:15:54
hanzz.k@gmail.com
Skype: Fix crash if alias is not set
1 file changed with 12 insertions and 6 deletions:
0 comments (0 inline, 0 general)
backends/skype/skypedb.cpp
Show inline comments
 
@@ -130,9 +130,18 @@ bool loadBuddies(SkypePlugin *np, const std::string &db_path, std::string &user,
 
			BEGIN(stmt);
 
			int ret2;
 
			while((ret2 = sqlite3_step(stmt)) == SQLITE_ROW) {
 
				std::string buddy = (const char *) sqlite3_column_text(stmt, 0);
 
				std::string alias = (const char *) sqlite3_column_text(stmt, 1);
 
				const char *d = (const char *) sqlite3_column_text(stmt, 2);
 
				const char *d;
 
				d = (const char *) sqlite3_column_text(stmt, 0);
 
				if (!d) {
 
					continue;
 
				}
 

	
 
				ret = true;
 

	
 
				std::string buddy = d;
 
				d = (const char *) sqlite3_column_text(stmt, 1);
 
				std::string alias = d ? d : buddy;
 
				d = (const char *) sqlite3_column_text(stmt, 2);
 
				std::string mood_text = d ? d : "";
 

	
 
				std::vector<std::string> groups;
 
@@ -145,9 +154,6 @@ bool loadBuddies(SkypePlugin *np, const std::string &db_path, std::string &user,
 
				FINALIZE_STMT(stmt);
 
				ret = false;
 
			}
 
			else {
 
				ret = true;
 
			}
 
		}
 
		else {
 
			LOG4CXX_ERROR(logger, "Can't create prepared statement");
0 comments (0 inline, 0 general)