summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-09-14 06:39:26 (GMT)
committerBill King <bill.king@nokia.com>2009-09-14 23:10:43 (GMT)
commitb2d7bcf1e77e8b9bc8fc1b40777907d7a8d47c09 (patch)
tree796d71d55da94cdb56da5c60e5eb514f694407f6
parentf1710803cc17a50d098e945e86ad75d42b036935 (diff)
downloadQt-b2d7bcf1e77e8b9bc8fc1b40777907d7a8d47c09.zip
Qt-b2d7bcf1e77e8b9bc8fc1b40777907d7a8d47c09.tar.gz
Qt-b2d7bcf1e77e8b9bc8fc1b40777907d7a8d47c09.tar.bz2
Fixes crash when calling numRows on unknown query type (ibase)
Reviewed-by: Justin McPherson
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp
index bde3930..7a4609d 100644
--- a/src/sql/drivers/ibase/qsql_ibase.cpp
+++ b/src/sql/drivers/ibase/qsql_ibase.cpp
@@ -1262,6 +1262,9 @@ int QIBaseResult::numRowsAffected()
case isc_info_sql_stmt_insert:
cCountType = isc_info_req_insert_count;
break;
+ default:
+ qWarning() << "numRowsAffected: Unknown statement type (" << d->queryType << ")";
+ return -1;
}
char acBuffer[33];