From 3c092edf3fb1420e40d01f242c9e49fc08e96065 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 4 Sep 2006 14:57:39 +0000 Subject: [PATCH] if tmp can be null then m_current can be as well (CID 2644) svn path=/trunk/playground/graphics/okular/; revision=580808 --- ui/toc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/toc.cpp b/ui/toc.cpp index 182366858..9c84b7590 100644 --- a/ui/toc.cpp +++ b/ui/toc.cpp @@ -156,7 +156,8 @@ void TOC::notifyViewportChanged( bool /*smoothMove*/ ) if ( p == newpage ) { m_current = tmp; - m_current->setSelected( true ); + if (m_current) + m_current->setSelected( true ); } ++it; }