Author: tabish
Date: Wed Aug 18 13:57:02 2010
New Revision: 986681

URL: http://svn.apache.org/viewvc?rev=986681&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-312

Modified:
    
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp

Modified: 
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
URL: 
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp?rev=986681&r1=986680&r2=986681&view=diff
==============================================================================
--- 
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
 (original)
+++ 
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
 Wed Aug 18 13:57:02 2010
@@ -275,7 +275,9 @@ void PrimitiveTypesMarshaller::marshalPr
             std::vector<unsigned char> data = value.getByteArray();
 
             dataOut.writeInt( (int)data.size() );
-            dataOut.write( &data[0], (int)data.size() );
+                       if( !data.empty() ) {
+                               dataOut.write( &data[0], (int)data.size() );
+                       }
 
         } else if( value.getType() == PrimitiveValueNode::STRING_TYPE ) {
 


Reply via email to