Author: aconway
Date: Mon Aug 20 06:28:55 2007
New Revision: 567698
URL: http://svn.apache.org/viewvc?rev=567698&view=rev
Log:
get() returns 0 if Blob is empty.
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h?rev=567698&r1=567697&r2=567698&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/Blob.h Mon Aug 20 06:28:55
2007
@@ -143,7 +143,7 @@
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(); }