Correct wxObjectDataPtr<> assignment from *T to not increase the ref count
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		| @@ -456,7 +456,12 @@ public: | ||||
|     } | ||||
|  | ||||
|     T *get() const { return m_ptr; } | ||||
|     T *operator->() const { return get(); } | ||||
|      | ||||
|     T *operator->() const | ||||
|     {  | ||||
|         wxASSERT(m_ptr != NULL);     | ||||
|         return get();  | ||||
|     } | ||||
|  | ||||
|     void reset(T *ptr) | ||||
|     { | ||||
| @@ -480,8 +485,6 @@ public: | ||||
|         if (m_ptr)  | ||||
|             m_ptr->DecRef();  | ||||
|         m_ptr = ptr;  | ||||
|         if (m_ptr) | ||||
|             m_ptr->IncRef();  | ||||
|         return *this; | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user