aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-05-23 16:09:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-05-23 16:09:54 +0200
commit539b70c28091a7cdfc0abe106102a151f075e6ef (patch)
tree06d095921a59300eec154ee573a153812233baa1
parent4109a2a3f76ab35992c557bad81048d3fef5c409 (diff)
Test BLOB container is not empty before calling front()as
-rw-r--r--odb/mssql/traits.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb/mssql/traits.cxx b/odb/mssql/traits.cxx
index 97ec318..f089803 100644
--- a/odb/mssql/traits.cxx
+++ b/odb/mssql/traits.cxx
@@ -496,7 +496,7 @@ namespace odb
{
const value_type& v (*static_cast<const value_type*> (context));
- *buffer = &v.front ();
+ *buffer = v.empty () ? 0 : &v.front ();
*size = v.size ();
*chunk = chunk_one;
}
@@ -566,7 +566,7 @@ namespace odb
{
const value_type& v (*static_cast<const value_type*> (context));
- *buffer = &v.front ();
+ *buffer = v.empty () ? 0 : &v.front ();
*size = v.size ();
*chunk = chunk_one;
}