diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-05-23 16:09:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-05-23 16:09:54 +0200 |
commit | 69f440cf8c0bd4a9cce1d97cce2ebb54cee6dd0f (patch) | |
tree | 1ac527c5e077ae2e49963a81c20a1dc9a69b88b4 | |
parent | 449f9abcba8c829950f8f8450c45de8d4c927811 (diff) |
Test BLOB container is not empty before calling front()as
-rw-r--r-- | odb/oracle/traits.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/odb/oracle/traits.cxx b/odb/oracle/traits.cxx index 3488398..35a3c6c 100644 --- a/odb/oracle/traits.cxx +++ b/odb/oracle/traits.cxx @@ -147,7 +147,7 @@ namespace odb *p = chunk_one; *s = static_cast<ub4> (v.size ()); - *b = &v.front (); + *b = v.empty () ? 0 : &v.front (); return true; } @@ -197,7 +197,7 @@ namespace odb *p = chunk_one; *s = static_cast<ub4> (v.size ()); - *b = &v.front (); + *b = v.empty () ? 0 : &v.front (); return true; } |