diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-05-02 11:51:53 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-05-02 11:52:49 +0200 |
commit | c18d8bd2d2ec5ba8dd9c43a99117aed82a919267 (patch) | |
tree | 894342813356efb7d2638df5928c8c5a0b71def4 | |
parent | 7061e8403a3afddae253ad0a016e5613616030bb (diff) |
Don't crash with empty *pTxt
Change-Id: I5fdd0cbc70dec1119b1b6a76cb3c5805f11c11ed
-rw-r--r-- | sw/source/core/text/inftxt.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index 2faee80b15b4..0fd3922ecea1 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; |