sw/source/core/text/inftxt.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit c18d8bd2d2ec5ba8dd9c43a99117aed82a919267 Author: Fridrich Å trba <fridrich.st...@bluewin.ch> Date: Thu May 2 11:51:53 2013 +0200 Don't crash with empty *pTxt Change-Id: I5fdd0cbc70dec1119b1b6a76cb3c5805f11c11ed diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index 2faee80..0fd3922 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -265,7 +265,7 @@ public: inline const SwViewOption &GetOpt() const { return *pOpt; } inline const OUString &GetTxt() const { return *pTxt; } inline sal_Unicode GetChar( const sal_Int32 nPos ) const - { return (*pTxt)[ nPos ]; } + { if (pTxt && !pTxt->isEmpty()) return (*pTxt)[ nPos ]; return 0; } inline KSHORT GetTxtHeight() const;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits