From: Aki Tuomi Date: Thu, 14 Jan 2016 06:53:51 +0000 (+0200) Subject: Assert column count when result is not empty X-Git-Tag: dnsdist-1.0.0-alpha2~40^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c55d03839e99330a47d32dc129f5b2b4d27f513;p=pdns Assert column count when result is not empty --- diff --git a/pdns/backends/gsql/gsqlbackend.cc b/pdns/backends/gsql/gsqlbackend.cc index 2d6b7f8ff..f2130079c 100644 --- a/pdns/backends/gsql/gsqlbackend.cc +++ b/pdns/backends/gsql/gsqlbackend.cc @@ -1102,8 +1102,8 @@ bool GSQLBackend::superMasterBackend(const string &ip, const DNSName &domain, co catch (SSqlException &e) { throw PDNSException("GSQLBackend unable to search for a domain: "+e.txtReason()); } - ASSERT_ROW_COLUMNS("supermaster-query", d_result[0], 1); if(!d_result.empty()) { + ASSERT_ROW_COLUMNS("supermaster-query", d_result[0], 1); *nameserver=i->content; *account=d_result[0][0]; *ddb=this;