Fix no graphics crashing

This commit is contained in:
Benau 2020-01-19 10:50:12 +08:00
parent 726a40ae2d
commit 1e53f67354
2 changed files with 3 additions and 2 deletions

View File

@ -204,6 +204,7 @@ void* NewsManager::downloadNews(void *obj)
xml = new XMLNode(xml_file); xml = new XMLNode(xml_file);
me->checkRedirect(xml); me->checkRedirect(xml);
me->updateNews(xml, xml_file); me->updateNews(xml, xml_file);
if (addons_manager)
addons_manager->init(xml, me->m_force_refresh); addons_manager->init(xml, me->m_force_refresh);
delete xml; delete xml;
} }

View File

@ -145,7 +145,7 @@ void MainMenuScreen::init()
input_manager->getDeviceManager()->clearLatestUsedDevice(); input_manager->getDeviceManager()->clearLatestUsedDevice();
#ifndef SERVER_ONLY #ifndef SERVER_ONLY
if (addons_manager->isLoading()) if (addons_manager && addons_manager->isLoading())
{ {
IconButtonWidget* w = getWidget<IconButtonWidget>("addons"); IconButtonWidget* w = getWidget<IconButtonWidget>("addons");
w->setActive(false); w->setActive(false);