summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-07-31 18:40:07 +0000
committerAlan Conway <aconway@apache.org>2009-07-31 18:40:07 +0000
commit0a26b8c9543e066a19c8b457f41425972eb0b0c4 (patch)
tree409db882143e8b923095c4dc6c3578809e2a7cba /cpp/src
parentd4408a59e892bd66cd17ac9fd09b949821260b77 (diff)
downloadqpid-python-0a26b8c9543e066a19c8b457f41425972eb0b0c4.tar.gz
Make AMQFrame::getMethod() safe on frames with no body.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@799686 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/framing/AMQFrame.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/qpid/framing/AMQFrame.h b/cpp/src/qpid/framing/AMQFrame.h
index cae506fc06..29e368b671 100644
--- a/cpp/src/qpid/framing/AMQFrame.h
+++ b/cpp/src/qpid/framing/AMQFrame.h
@@ -46,8 +46,8 @@ class AMQFrame : public AMQDataBlock
QPID_COMMON_EXTERN AMQBody* getBody();
QPID_COMMON_EXTERN const AMQBody* getBody() const;
- AMQMethodBody* getMethod() { return getBody()->getMethod(); }
- const AMQMethodBody* getMethod() const { return getBody()->getMethod(); }
+ AMQMethodBody* getMethod() { return getBody() ? getBody()->getMethod() : 0; }
+ const AMQMethodBody* getMethod() const { return getBody() ? getBody()->getMethod() : 0; }
void setMethod(ClassId c, MethodId m);