renaissance1: #i107215# Added guard against missing dispatcher.
This commit is contained in:
@@ -1402,10 +1402,15 @@ StartShowButton::StartShowButton (SlideSorter& rSlideSorter)
|
|||||||
|
|
||||||
bool StartShowButton::IsEnabled (void) const
|
bool StartShowButton::IsEnabled (void) const
|
||||||
{
|
{
|
||||||
|
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
|
||||||
|
if (pViewShell == NULL)
|
||||||
|
return false;
|
||||||
|
SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
|
||||||
|
if (pDispatcher == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
const SfxPoolItem* pState = NULL;
|
const SfxPoolItem* pState = NULL;
|
||||||
const SfxItemState eState (mrSlideSorter.GetViewShell()->GetDispatcher()->QueryState(
|
const SfxItemState eState (pDispatcher->QueryState(SID_PRESENTATION, pState));
|
||||||
SID_PRESENTATION,
|
|
||||||
pState));
|
|
||||||
return (eState & SFX_ITEM_DISABLED) == 0;
|
return (eState & SFX_ITEM_DISABLED) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user