diff options
Diffstat (limited to 'cpp/src/qpid/framing/Handler.h')
-rw-r--r-- | cpp/src/qpid/framing/Handler.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/framing/Handler.h b/cpp/src/qpid/framing/Handler.h index fbf3c0b7ca..b93869be85 100644 --- a/cpp/src/qpid/framing/Handler.h +++ b/cpp/src/qpid/framing/Handler.h @@ -82,14 +82,14 @@ struct Handler { template <class X, void (X::*F)(T)> class MemFunRef : public Handler<T> { public: - MemFunRef(X& x, Handler<T>* next=0) : Handler(next), target(x) {} - void handle(T t) { (target.*F)(t); } + MemFunRef(X& x, Handler<T>* next=0) : Handler(next), target(&x) {} + void handle(T t) { (target->*F)(t); } /** Allow calling with -> syntax, compatible with Chains */ MemFunRef* operator->() { return this; } private: - X& target; + X* target; }; /** Interface for a handler that implements a |