diff options
-rw-r--r-- | sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 05a571592ce3..25f3acafa9f0 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -797,6 +797,11 @@ void SlideSorterViewShell::ExecMovePageUp (SfxRequest& /*rReq*/) // SdDrawDocument MovePages is based on SdPage IsSelected, so // transfer the SlideSorter selection to SdPages sal_uInt16 firstSelectedPageNo = SyncPageSelectionToDocument(xSelection).first; + + // In case no slide is selected + if (firstSelectedPageNo == SAL_MAX_UINT16) + return; + // Now compute human page number from internal page number firstSelectedPageNo = (firstSelectedPageNo - 1) / 2; |