diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-21 09:25:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-21 09:26:42 +0000 |
commit | 4be8eae04eaeaa943cdcfe7443813d47bf995123 (patch) | |
tree | 8a951bc7de7366269d731ccf8c7b02ba3ce79404 /sfx2/source/view/viewfrm.cxx | |
parent | 7fe28b2c7b9a1fd5718e1f5b6562cf93902d6be0 (diff) |
Resolves: fdo#88594 crash on F1 with local help
regression from
commit 1049511c0c5d881df4ba8042744d63d37878296f
Date: Tue Jan 13 21:43:27 2015 +0900
infobar: add buttons one by one with addButton
Change-Id: Icf758a9671191836bbe5bc7ca7d978574cb74479
Diffstat (limited to 'sfx2/source/view/viewfrm.cxx')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 5ba7ef13a3e2..77a15b5a5e09 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1380,10 +1380,12 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) else { SfxInfoBarWindow* pInfoBar = AppendInfoBar("readonly", SfxResId(STR_READONLY_DOCUMENT)); - - PushButton* pBtn = new PushButton( &GetWindow(), SfxResId(BT_READONLY_EDIT)); - pBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler)); - pInfoBar->addButton(pBtn); + if (pInfoBar) + { + PushButton* pBtn = new PushButton( &GetWindow(), SfxResId(BT_READONLY_EDIT)); + pBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler)); + pInfoBar->addButton(pBtn); + } } break; |