Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix memory leak in protocol 38 set_sky
- Loading branch information
Showing
with
1 addition
and
2 deletions.
-
+1
−2
src/network/clientpackethandler.cpp
|
@@ -1244,12 +1244,11 @@ void Client::handleCommand_HudSetSky(NetworkPacket* pkt) |
|
|
skybox.bgcolor = video::SColor(readARGB8(is)); |
|
|
skybox.type = std::string(deSerializeString(is)); |
|
|
u16 count = readU16(is); |
|
|
std::vector<std::string>* params = new std::vector<std::string>; |
|
|
|
|
|
for (size_t i = 0; i < count; i++) |
|
|
skybox.textures.emplace_back(deSerializeString(is)); |
|
|
|
|
|
bool clouds = true; |
|
|
skybox.clouds = true; |
|
|
try { |
|
|
skybox.clouds = readU8(is); |
|
|
} catch (...) {} |
|
|