Summary: | [Patch] Empty comicbook crash | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | David Palacio <dpalacio> |
Component: | Comicbook backend | Assignee: | Okular developers <okular-devel> |
Status: | CLOSED FIXED | ||
Severity: | crash | CC: | bradh |
Priority: | NOR | Keywords: | testcase |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Unspecified | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | testcase |
Description
David Palacio
2009-01-03 03:46:42 UTC
Created attachment 29853 [details]
testcase
Open in Okular crash.cbz
Can reproduce. Seems we should protect against this in core: --- okular/core/document.cpp (revision 903994) +++ okular/core/document.cpp (working copy) @@ -1660,6 +1660,9 @@ AudioPlayer::instance()->d->m_currentDocument = isstdin ? KUrl() : d->m_url; d->m_docSize = document_size; + if ( !d->m_generator ) + return false; + const QStringList docScripts = d->m_generator->metaData( "DocumentScripts", "JavaScript" ).toStringList(); if ( !docScripts.isEmpty() ) { D'oh, I put a protection against empty documents in the core, but forgot to actual set that the loading fails in that case. Fix coming in a minute. SVN commit 904821 by pino: When the loaded document is empty, consider its loading as failed. (Added a TODO for a proper UI message.) BUG: 179447 M +4 -0 document.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=904821 KDE 4.1.x is not affected, as this slipped in with a small refactoring of the loading routines (shame on me). Thanks for the bug report and the test case! |