diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-09-26 12:43:29 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-26 12:57:27 +0200 |
commit | d53e12c7a9c2d0a3b487303673c1fafd09f6593c (patch) | |
tree | 2ad08e0b624d0252f562cd1a22cfb28a2e2fac80 /sw/inc/unotxdoc.hxx | |
parent | 0843533459302d9d9fe962f79dc5b040c3907ebc (diff) |
rhbz#827695: sw: prevent crashes after incomplete print:
If the last page is not printed for whatever reason, then
SwXTextDocument's destructor will delete a SwViewOptionAdjust_Impl,
which accesses the document's ViewShell, which has already been
deleted at that point. Add a horrible kludge to not crash for now.
Change-Id: I67fe37970d60782030b84f2badddd1e66ef3f9c6
Diffstat (limited to 'sw/inc/unotxdoc.hxx')
-rw-r--r-- | sw/inc/unotxdoc.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 443aa763a6eb..3182bd268156 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -579,7 +579,7 @@ public: -----------------------------------------------------------------------*/ class SwViewOptionAdjust_Impl { - ViewShell & m_rShell; + ViewShell * m_pShell; SwViewOption m_aOldViewOptions; public: @@ -587,7 +587,8 @@ public: ~SwViewOptionAdjust_Impl(); void AdjustViewOptions( SwPrintData const* const pPrtOptions ); bool checkShell( const ViewShell& rCompare ) const - { return &rCompare == &m_rShell; } + { return &rCompare == m_pShell; } + void DontTouchThatViewShellItSmellsFunny() { m_pShell = 0; } }; |