mirror of
https://github.com/celisej567/mcpe.git
synced 2025-12-31 17:49:17 +03:00
* Fix use after free in ProgressScreen
This commit is contained in:
@@ -15,12 +15,6 @@ bool ProgressScreen::isInGameScreen()
|
||||
|
||||
void ProgressScreen::render(int a, int b, float c)
|
||||
{
|
||||
if (m_pMinecraft->isLevelGenerated())
|
||||
{
|
||||
m_pMinecraft->setScreen(nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
renderBackground();
|
||||
|
||||
// render the dirt background
|
||||
@@ -84,3 +78,14 @@ void ProgressScreen::render(int a, int b, float c)
|
||||
sleepMs(50);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ProgressScreen::updateEvents()
|
||||
{
|
||||
if (m_pMinecraft->isLevelGenerated())
|
||||
{
|
||||
m_pMinecraft->setScreen(nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
Screen::updateEvents();
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class ProgressScreen : public Screen
|
||||
{
|
||||
public:
|
||||
void render(int, int, float) override;
|
||||
void updateEvents() override;
|
||||
bool isInGameScreen() override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user