mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-25 13:56:39 -04:00
Fix crash when trying to open non existing file
if the reader is null because the file doesn't exist, it returns
This commit is contained in:
parent
2adc00074e
commit
fcba24c119
@ -43,6 +43,8 @@ void WebView::onUrlChanged(const QUrl& url) {
|
||||
emit zimIdChanged(m_currentZimId);
|
||||
auto app = KiwixApp::instance();
|
||||
auto reader = app->getLibrary()->getReader(m_currentZimId);
|
||||
if (!reader)
|
||||
return;
|
||||
std::string favicon, _mimetype;
|
||||
reader->getFavicon(favicon, _mimetype);
|
||||
QPixmap pixmap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user