diff --git a/src/App/DocumentObserver.h b/src/App/DocumentObserver.h index c92cb3155b..c32c780a01 100644 --- a/src/App/DocumentObserver.h +++ b/src/App/DocumentObserver.h @@ -387,6 +387,11 @@ public: bool operator!= (const WeakPtrT& p) const { return ptr != p.ptr; } + /*! Get a pointer to the object or 0 if it doesn't exist any more. */ + T* get() const noexcept + { + return ptr.get(); + } private: // disable