Avoid crash in case of ENENT_..._NONE messages (which typically
don't have packet data). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@13189 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d0059d32d4
commit
706c231691
@ -37,7 +37,10 @@ Event::Event(ENetEvent* event)
|
||||
type = EVENT_TYPE_MESSAGE;
|
||||
break;
|
||||
case ENET_EVENT_TYPE_NONE:
|
||||
enet_packet_destroy(event->packet);
|
||||
// Typically there's no packet data, but just in
|
||||
// case test and delete it
|
||||
if(event->packet)
|
||||
enet_packet_destroy(event->packet);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user