Fix two memleak reports from Coverity (#12466)
This commit is contained in:
parent
4b087a0de2
commit
4163c872af
@ -1905,7 +1905,7 @@ void Game::processKeyInput()
|
|||||||
if (client->modsLoaded())
|
if (client->modsLoaded())
|
||||||
openConsole(0.2, L".");
|
openConsole(0.2, L".");
|
||||||
else
|
else
|
||||||
m_game_ui->showStatusText(wgettext("Client side scripting is disabled"));
|
m_game_ui->showTranslatedStatusText("Client side scripting is disabled");
|
||||||
} else if (wasKeyDown(KeyType::CONSOLE)) {
|
} else if (wasKeyDown(KeyType::CONSOLE)) {
|
||||||
openConsole(core::clamp(g_settings->getFloat("console_height"), 0.1f, 1.0f));
|
openConsole(core::clamp(g_settings->getFloat("console_height"), 0.1f, 1.0f));
|
||||||
} else if (wasKeyDown(KeyType::FREEMOVE)) {
|
} else if (wasKeyDown(KeyType::FREEMOVE)) {
|
||||||
|
@ -1219,7 +1219,8 @@ int ModApiEnvMod::l_emerge_area(lua_State *L)
|
|||||||
sortBoxVerticies(bpmin, bpmax);
|
sortBoxVerticies(bpmin, bpmax);
|
||||||
|
|
||||||
size_t num_blocks = VoxelArea(bpmin, bpmax).getVolume();
|
size_t num_blocks = VoxelArea(bpmin, bpmax).getVolume();
|
||||||
assert(num_blocks != 0);
|
if (num_blocks == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (lua_isfunction(L, 3)) {
|
if (lua_isfunction(L, 3)) {
|
||||||
callback = LuaEmergeAreaCallback;
|
callback = LuaEmergeAreaCallback;
|
||||||
|
Loading…
Reference in New Issue
Block a user