aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-04-25 09:45:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-04-25 09:45:09 +0200
commit177658c41d9949f7f327a714210835967a2e9d3e (patch)
treeb7b3e37dcab27efaefa245a0b5491ca8c29a6101
parent523c0184c0360f6ba77819f90c90afd7a71d1370 (diff)
Check if truncation flag pointer is NULL before setting it
-rw-r--r--odb/sqlite/statement.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/odb/sqlite/statement.cxx b/odb/sqlite/statement.cxx
index f503144..32e8d2a 100644
--- a/odb/sqlite/statement.cxx
+++ b/odb/sqlite/statement.cxx
@@ -121,7 +121,8 @@ namespace odb
if (truncated && !*b.truncated)
continue;
- *b.truncated = false;
+ if (b.truncated)
+ *b.truncated = false;
// Check for NULL unless we are reloading a truncated result.
//
@@ -154,7 +155,9 @@ namespace odb
if (*b.size > b.capacity)
{
- *b.truncated = true;
+ if (b.truncated)
+ *b.truncated = true;
+
r = false;
continue;
}