don't crash when clicking on [+]

svn path=/trunk/KDE/kdegraphics/kpdf/; revision=421335
remotes/origin/kpdf
Albert Astals Cid 21 years ago
parent c6698337c7
commit d599aebde9
  1. 6
      ui/toc.cpp

@ -120,7 +120,11 @@ void TOC::addChildren( const QDomNode & parentNode, KListViewItem * parentItem )
void TOC::slotExecuted( QListViewItem *i )
{
const QDomElement & e = static_cast< TOCItem* >( i )->element();
TOCItem* tocItem = dynamic_cast<TOCItem*>( i );
// that filters clicks on [+] that for a strange reason don't seem to be TOCItem*
if (tocItem == NULL)
return;
const QDomElement & e = tocItem->element();
if ( e.hasAttribute( "Viewport" ) )
{
// if the node has a viewport, set it

Loading…
Cancel
Save