mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-23 06:13:35 +03:00
fix(ui): fix potential nullptr dereferencing (fixes #1101)
This commit is contained in:
parent
0b2657c44a
commit
c46f389512
@ -62,10 +62,10 @@ BrowserTab::BrowserTab(QWidget *parent)
|
|||||||
|
|
||||||
Registry::Docset *docset = Core::Application::instance()->docsetRegistry()->docset(name);
|
Registry::Docset *docset = Core::Application::instance()->docsetRegistry()->docset(name);
|
||||||
if (docset) {
|
if (docset) {
|
||||||
m_searchSidebar->pageTocModel()->setResults(docset->relatedLinks(url));
|
searchSidebar()->pageTocModel()->setResults(docset->relatedLinks(url));
|
||||||
m_webControl->setJavaScriptEnabled(docset->isJavaScriptEnabled());
|
m_webControl->setJavaScriptEnabled(docset->isJavaScriptEnabled());
|
||||||
} else {
|
} else {
|
||||||
m_searchSidebar->pageTocModel()->setResults();
|
searchSidebar()->pageTocModel()->setResults();
|
||||||
// Always enable JS outside of docsets.
|
// Always enable JS outside of docsets.
|
||||||
m_webControl->setJavaScriptEnabled(true);
|
m_webControl->setJavaScriptEnabled(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user