From ba5469bc7a14cc388b4f690c7ef658812d23deb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 27 Nov 2013 18:33:15 +0100 Subject: Fix kpdf crash while closing session This resolves Bug 1728 --- kpdf/part.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'kpdf') diff --git a/kpdf/part.cpp b/kpdf/part.cpp index f7ad73c9..dee572e6 100644 --- a/kpdf/part.cpp +++ b/kpdf/part.cpp @@ -1078,8 +1078,11 @@ void Part::restoreDocument(TDEConfig* config) void Part::saveDocumentRestoreInfo(TDEConfig* config) { - config->writePathEntry( "URL", url().url() ); - config->writeEntry( "Viewport", m_document->viewport().toString() ); + if ( url().isValid() ) + { + config->writePathEntry( "URL", url().url() ); + config->writeEntry( "Viewport", m_document->viewport().toString() ); + } } /* -- cgit v1.2.1