Commit d3d8999a authored by Enrico Ros's avatar Enrico Ros

don't crash if the generator doesn't support searching text

svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428596
parent 789e799b
......@@ -638,8 +638,8 @@ void KPDFDocument::setNextViewport()
bool KPDFDocument::searchText( int searchID, const QString & text, bool fromStart, bool caseSensitive,
SearchType type, bool moveViewport, const QColor & color, bool noDialogs )
{
// don't perform searches on empty docs
if ( !generator || pages_vector.isEmpty() )
// safety checks: don't perform searches on empty or unsearchable docs
if ( !generator || !generator->canGenerateTextPage() || pages_vector.isEmpty() )
return false;
// if searchID search not recorded, create new descriptor and init params
......
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