mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-02 03:20:34 +00:00
Fixed incorrect iterator usage revealed by libstdc++ debug mode.
Fixed "error: attempt to dereference a singular iterator" error when running unit tests compiled with -D_GLIBCXX_DEBUG.
This commit is contained in:
parent
fee2e0b4c6
commit
fd6d9dd86d
@ -905,8 +905,8 @@ TCPsocket get_received_data(TCPsocket sock, config& cfg, bool* gzipped,network::
|
||||
buffer* buf = *itor;
|
||||
if (gzipped)
|
||||
*gzipped = buf->gzipped;
|
||||
received_data_queue.erase(itor);
|
||||
bandwidth_in.reset(new network::bandwidth_in((*itor)->raw_buffer.size()));
|
||||
received_data_queue.erase(itor);
|
||||
delete buf;
|
||||
return res;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user