forked from Mirrorlandia_minetest/minetest
Fixed error reported by cppcheck:
[./server.cpp:1327]: (error) Possible null pointer dereference: obj - otherwise it is redundant to check if obj is null at line 1332
This commit is contained in:
parent
67d5f5c1d5
commit
3f153c20d3
@ -1323,8 +1323,11 @@ void Server::AsyncRunStep()
|
|||||||
writeU8((u8*)buf, type);
|
writeU8((u8*)buf, type);
|
||||||
data_buffer.append(buf, 1);
|
data_buffer.append(buf, 1);
|
||||||
|
|
||||||
|
if(obj)
|
||||||
data_buffer.append(serializeLongString(
|
data_buffer.append(serializeLongString(
|
||||||
obj->getClientInitializationData()));
|
obj->getClientInitializationData()));
|
||||||
|
else
|
||||||
|
data_buffer.append(serializeLongString(""));
|
||||||
|
|
||||||
// Add to known objects
|
// Add to known objects
|
||||||
client->m_known_objects.insert(i.getNode()->getKey(), false);
|
client->m_known_objects.insert(i.getNode()->getKey(), false);
|
||||||
|
Loading…
Reference in New Issue
Block a user