From fb7b5ae9627ea45c26ef841e9976b3891a6c3063 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 20 Aug 2007 13:28:55 +0000 Subject: get() returns 0 if Blob is empty. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@567698 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/framing/Blob.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qpid/cpp') diff --git a/qpid/cpp/src/qpid/framing/Blob.h b/qpid/cpp/src/qpid/framing/Blob.h index ea44dc104e..7c17611dc8 100644 --- a/qpid/cpp/src/qpid/framing/Blob.h +++ b/qpid/cpp/src/qpid/framing/Blob.h @@ -143,7 +143,7 @@ class Blob Blob& operator=(const T& x) { clear(); construct(in_place(x)); return *this; } /** Get pointer to blob contents. Caller must know how to cast it. */ - void* get() { return store.address(); } + void* get() { return empty() ? 0 : store.address(); } /** Get const pointer to blob contents */ const void* get() const { return empty() ? 0 : store.address(); } -- cgit v1.2.1