sw/source/core/unocore/unotext.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit a327cd771e18b8677567f576e3bd88b69d2ee200 Author: Noel Power <noel.po...@novell.com> Date: Mon Dec 19 16:11:04 2011 +0100 sw: avoid creating cursor with non-text node text range (fdo#40195) diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 28ff73f..820239f 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2480,6 +2480,9 @@ throw (uno::RuntimeException) SwUnoInternalPaM aPam(*GetDoc()); if (::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { + if ( !aPam.GetNode()->GetTxtNode() ) + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid text range") ), uno::Reference< uno::XInterface >() ); + SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); SwStartNode* p1 = aPam.GetNode()->StartOfSectionNode(); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits