summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-11 10:42:24 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-11 10:42:24 +0100
commit8712f0555baab0830aace424f143ad3c9eeaa028 (patch)
tree11f6b002234071b8a82105f1f766aea81825f981 /sw/source
parented00d0ddd663085a5fd180301cdc82af80bc8077 (diff)
fix corner case crash in xhtml headless export as pdf
Change-Id: I255504e2c84783387d2fc308800812bef5e82734
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/web/wview.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/uibase/web/wview.cxx b/sw/source/uibase/web/wview.cxx
index b215f538c776..c2bd48b1fb78 100644
--- a/sw/source/uibase/web/wview.cxx
+++ b/sw/source/uibase/web/wview.cxx
@@ -142,9 +142,12 @@ void SwWebView::SelectShell()
pSfxShell->ISA( SwDrawTextShell ) || pSfxShell->ISA( SwAnnotationShell ) ) )
break;
}
- pSfxShell = rDispatcher.GetShell( --i );
- OSL_ENSURE( pSfxShell, "My Shell ist lost in space" );
- rDispatcher.Pop( *pSfxShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE);
+ if (i)
+ {
+ pSfxShell = rDispatcher.GetShell( --i );
+ OSL_ENSURE( pSfxShell, "My Shell ist lost in space" );
+ rDispatcher.Pop( *pSfxShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE);
+ }
}
bool bInitFormShell = false;