aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}