Kaydet (Commit) d8e91627 authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Stephan Bergmann

tdf#101249 fixed crash after inserting OLE object

Change-Id: I4ddd52f5da1745a2b9f2d6d54d5091d8f10107e7
Reviewed-on: https://gerrit.libreoffice.org/29155Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst b9cc6653
...@@ -100,12 +100,15 @@ public: ...@@ -100,12 +100,15 @@ public:
m_bInitialized = true; m_bInitialized = true;
SystemWindow* pSystemWindow = SfxViewFrame::Current()->GetFrame().GetSystemWindow(); 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(); long nWidth = pSystemWindow->GetSizePixel().Width();
SetSizePixel(Size(nWidth, GetSizePixel().Height())); SetSizePixel(Size(nWidth, GetSizePixel().Height()));
}
} }
VclHBox::Paint(rRenderContext, rRect); VclHBox::Paint(rRenderContext, rRect);
......
...@@ -242,7 +242,13 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, ...@@ -242,7 +242,13 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
const Reference<css::frame::XFrame> & xFrame, const Reference<css::frame::XFrame> & xFrame,
const OUString& rUIFile) const OUString& rUIFile)
{ {
assert(pSysWindow); if (!pSysWindow)
{
if (SfxViewFrame::Current() && SfxViewFrame::Current()->GetWindow().GetSystemWindow())
pSysWindow = SfxViewFrame::Current()->GetWindow().GetSystemWindow();
else
return false;
}
if (IsActive()) if (IsActive())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment