aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/details/buffer.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb/details/buffer.hxx b/odb/details/buffer.hxx
index 8f0dc83..3dc1c03 100644
--- a/odb/details/buffer.hxx
+++ b/odb/details/buffer.hxx
@@ -22,14 +22,14 @@ namespace odb
public:
~basic_buffer_base ()
{
- if (data_)
+ if (data_ != 0)
operator delete (data_);
}
basic_buffer_base (std::size_t capacity)
: capacity_ (capacity)
{
- data_ = operator new (capacity_);
+ data_ = capacity_ == 0 ? 0 : operator new (capacity_);
}
std::size_t