Fix a crash caused by a uninitialized mutex and remove the 'setText' call from the thread because it can caused a crash
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5661 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
ad9eb86671
commit
93624d154c
@ -136,6 +136,7 @@ void AddonsScreen::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
|||||||
}
|
}
|
||||||
void AddonsScreen::init()
|
void AddonsScreen::init()
|
||||||
{
|
{
|
||||||
|
pthread_mutex_init(&(this->mutex), NULL);
|
||||||
m_update_status = this->getWidget<GUIEngine::LabelWidget>("update_status");
|
m_update_status = this->getWidget<GUIEngine::LabelWidget>("update_status");
|
||||||
std::cout << "Addons dir:" + file_manager->getAddonsDir() << std::endl;
|
std::cout << "Addons dir:" + file_manager->getAddonsDir() << std::endl;
|
||||||
this->type = "track";
|
this->type = "track";
|
||||||
|
@ -86,11 +86,11 @@ void MainMenuScreen::changeNewsText(std::string action)
|
|||||||
// to remove the break line.
|
// to remove the break line.
|
||||||
//info.replace(info.size()-1,1, "");
|
//info.replace(info.size()-1,1, "");
|
||||||
std::cout << info << std::endl;
|
std::cout << info << std::endl;
|
||||||
w->setText(std::string(info).c_str());
|
//w->setText(std::string(info).c_str());
|
||||||
}
|
}
|
||||||
if(action == "offline")
|
if(action == "offline")
|
||||||
{
|
{
|
||||||
w->setText(_("Can't access stkaddons server..."));
|
//w->setText(_("Can't access stkaddons server..."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user