]> granicus.if.org Git - pdns/commitdiff
Assert column count when result is not empty
authorAki Tuomi <cmouse@cmouse.fi>
Thu, 14 Jan 2016 06:53:51 +0000 (08:53 +0200)
committerAki Tuomi <cmouse@cmouse.fi>
Wed, 20 Jan 2016 11:17:00 +0000 (13:17 +0200)
pdns/backends/gsql/gsqlbackend.cc

index 2d6b7f8ff89e0c923f497059d75702375dc21636..f2130079cf86c5f6ec88f37e6106e042c9829e4e 100644 (file)
@@ -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;