MYSQL_RES can be valid pointer even when empty result set is returned
This commit is contained in:
parent
dc1228b5bd
commit
db3096599f
1 changed files with 1 additions and 1 deletions
|
@ -449,7 +449,7 @@ bool MySQLBackend::getUser(const std::string &barejid, UserInfo &user) {
|
|||
LOG4CXX_INFO(logger, "Executing '" << query << "' to find out if user " << barejid << " is VIP");
|
||||
if (exec(query)) {
|
||||
MYSQL_RES *result = mysql_store_result(&m_conn);
|
||||
if (result) {
|
||||
if (result && mysql_num_rows(result) > 0) {
|
||||
LOG4CXX_INFO(logger, "User " << barejid << " is VIP");
|
||||
user.vip = 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue