Skip to content
Permalink
Browse files

Fix crash when creating guide and no pages in layout

  • Loading branch information
nyalldawson committed Aug 7, 2017
1 parent 2f49329 commit 04e6529efd7294d9c708f03756d6d029a76bd1b7
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/gui/layout/qgslayoutruler.cpp
@@ -585,6 +585,9 @@ void QgsLayoutRuler::mouseMoveEvent( QMouseEvent *event )
QgsLayout *layout = mView->currentLayout();
int pageNo = layout->pageCollection()->pageNumberForPoint( displayPos );
QgsLayoutItemPage *page = layout->pageCollection()->page( pageNo );
if ( !page )
return;

QPen linePen = mGuideItem->pen();
// if guide preview is outside a page draw it a lot fainter, to indicate it's invalid
if ( !layout->pageCollection()->pageAtPoint( displayPos ) )

0 comments on commit 04e6529

Please sign in to comment.
You can’t perform that action at this time.