sw/inc/unocrsr.hxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit b1686298cb81b8c1f56a217ebe9333f1e0007d5a Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Mon Aug 20 17:21:36 2018 +0200 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Sep 20 17:40:36 2018 +0200 sw: fix listener registration of sw::UnoCursorPointer Listening at one SwUnoCursor at a time is enough; this triggers asserts added in 1925a57dee73933ffbdb3b57349b757470a8218a from SwNavigationMgr. Change-Id: I791355533214daeb1779cd7d1a6aac7faa1a1472 (cherry picked from commit 503f07caa904ba375e390ad87640115866c3db05) Reviewed-on: https://gerrit.libreoffice.org/60746 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx index fc03253a1109..15468a847743 100644 --- a/sw/inc/unocrsr.hxx +++ b/sw/inc/unocrsr.hxx @@ -146,6 +146,10 @@ namespace sw { return *get(); } UnoCursorPointer& operator=(UnoCursorPointer aOther) { + if (m_pCursor) + { + EndListening(m_pCursor->m_aNotifier); + } if(aOther.m_pCursor) StartListening(aOther.m_pCursor->m_aNotifier); m_pCursor = aOther.m_pCursor; @@ -157,7 +161,7 @@ namespace sw { if(pNew) StartListening(pNew->m_aNotifier); - else if(m_pCursor) + if (m_pCursor) EndListening(m_pCursor->m_aNotifier); m_pCursor = pNew; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits