X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2Fsg_netChannel.cxx;h=1561e8de464bbbc83413915f1b53d82ec2367727;hb=70c5d605641b628039f75cb8761ce783a17a5bdf;hp=e62e120ad173c3240e3a7a25151a03636b38fd25;hpb=6edb0f66d53b34097146f2ec00f50d2a847b04c3;p=simgear.git diff --git a/simgear/io/sg_netChannel.cxx b/simgear/io/sg_netChannel.cxx index e62e120a..1561e8de 100644 --- a/simgear/io/sg_netChannel.cxx +++ b/simgear/io/sg_netChannel.cxx @@ -251,6 +251,11 @@ NetChannelPoller::removeChannel(NetChannel* channel) assert(channel->poller == this); channel->poller = NULL; + // portability: MSVC throws assertion failure when empty + if (channels.empty()) { + return; + } + ChannelList::iterator it = channels.begin(); for (; it != channels.end(); ++it) { if (*it == channel) {