summaryrefslogtreecommitdiff
path: root/sfx2/source/notebookbar/PriorityHBox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/notebookbar/PriorityHBox.cxx')
-rw-r--r--sfx2/source/notebookbar/PriorityHBox.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx
index 46f62827f254..6071b7e2578d 100644
--- a/sfx2/source/notebookbar/PriorityHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityHBox.cxx
@@ -100,12 +100,15 @@ public:
m_bInitialized = true;
SystemWindow* pSystemWindow = SfxViewFrame::Current()->GetFrame().GetSystemWindow();
- pSystemWindow->AddEventListener(LINK(this, PriorityHBox, WindowEventListener));
+ if (pSystemWindow)
+ {
+ pSystemWindow->AddEventListener(LINK(this, PriorityHBox, WindowEventListener));
- CalcNeededWidth();
+ CalcNeededWidth();
- long nWidth = pSystemWindow->GetSizePixel().Width();
- SetSizePixel(Size(nWidth, GetSizePixel().Height()));
+ long nWidth = pSystemWindow->GetSizePixel().Width();
+ SetSizePixel(Size(nWidth, GetSizePixel().Height()));
+ }
}
VclHBox::Paint(rRenderContext, rRect);