renaissance1: #i107215# Added guard against missing dispatcher.
This commit is contained in:
parent
d57de36d81
commit
11ce307732
1 changed files with 8 additions and 3 deletions
|
@ -1402,10 +1402,15 @@ StartShowButton::StartShowButton (SlideSorter& rSlideSorter)
|
|||
|
||||
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 SfxItemState eState (mrSlideSorter.GetViewShell()->GetDispatcher()->QueryState(
|
||||
SID_PRESENTATION,
|
||||
pState));
|
||||
const SfxItemState eState (pDispatcher->QueryState(SID_PRESENTATION, pState));
|
||||
return (eState & SFX_ITEM_DISABLED) == 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue