summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-08-20 13:28:55 +0000
committerAlan Conway <aconway@apache.org>2007-08-20 13:28:55 +0000
commiteb7df68733b53ad2b9c17520771261a8c5025703 (patch)
treed1da1ac60de4db36c20a986c6c43bb1594a1ce51 /cpp/src
parent845c9eb603de973aaccb57b3c7ee0ff997b976c7 (diff)
downloadqpid-python-eb7df68733b53ad2b9c17520771261a8c5025703.tar.gz
get() returns 0 if Blob is empty.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567698 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/framing/Blob.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/framing/Blob.h b/cpp/src/qpid/framing/Blob.h
index ea44dc104e..7c17611dc8 100644
--- a/cpp/src/qpid/framing/Blob.h
+++ b/cpp/src/qpid/framing/Blob.h
@@ -143,7 +143,7 @@ class Blob
Blob& operator=(const T& x) { clear(); construct(in_place<T>(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(); }