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

View File

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