Commit ff9c6a6a authored by Pino Toscano's avatar Pino Toscano

do not leak the dvi renderer when the loading fails

svn path=/trunk/KDE/kdegraphics/okular/; revision=965081
parent f1455f14
......@@ -67,7 +67,11 @@ bool DviGenerator::loadDocument( const QString & fileName, QVector< Okular::Page
m_dviRenderer = new dviRenderer();
if ( ! m_dviRenderer->setFile( fileName, base ) )
{
delete m_dviRenderer;
m_dviRenderer = 0;
return false;
}
m_dviRenderer->setParentWidget( document()->widget() );
......
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