summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/Response.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/client/Response.h')
-rw-r--r--cpp/src/qpid/client/Response.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/Response.h b/cpp/src/qpid/client/Response.h
index ad37d7c0f4..7866df916c 100644
--- a/cpp/src/qpid/client/Response.h
+++ b/cpp/src/qpid/client/Response.h
@@ -39,7 +39,8 @@ public:
template <class T> T& as()
{
framing::AMQMethodBody* response(future->getResponse());
- return dynamic_cast<T&>(*response);
+ assert(response);
+ return *boost::polymorphic_downcast<T*>(response);
}
template <class T> bool isA()
{