summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index bfaed00b49f..f7ef9a652fb 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -3588,7 +3588,7 @@ static void print_warnings()
mysql_store_result_for_lazy(&result);
/* Bail out when no warnings */
- if (!(num_rows= mysql_num_rows(result)))
+ if (!result || !(num_rows= mysql_num_rows(result)))
goto end;
cur= mysql_fetch_row(result);