diff OrthancServer/DatabaseWrapper.cpp @ 218:0200cd330582

fixes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 29 Nov 2012 13:27:33 +0100
parents 4453a010d0db
children 8098448bd827
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp	Thu Nov 29 12:22:23 2012 +0100
+++ b/OrthancServer/DatabaseWrapper.cpp	Thu Nov 29 13:27:33 2012 +0100
@@ -576,7 +576,11 @@
     sprintf(buf, "SELECT COUNT(*) FROM %s", table.c_str());
     SQLite::Statement s(db_, buf);
 
-    assert(s.Step());
+    if (!s.Step())
+    {
+      throw OrthancException(ErrorCode_InternalError);
+    }
+
     int64_t c = s.ColumnInt(0);
     assert(!s.Step());