Commit 88804399 authored by Geoffry Song's avatar Geoffry Song
Browse files

fix a crash when rightclicking outside a page in text selection mode

parent 34b2e1ba
......@@ -2610,9 +2610,9 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
else if ( !d->mousePressPos.isNull() && rightButton )
{
PageViewItem* item = pickItemOnPoint(eventPos.x(),eventPos.y());
const Okular::Page *page = item->page();
const Okular::Page *page;
//if there is text selected in the page
if(page->textSelection())
if (item && (page = item->page())->textSelection())
{
KMenu menu( this );
QAction *textToClipboard = menu.addAction( KIcon( "edit-copy" ), i18n( "Copy Text" ) );
......
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