Fixing crash when joinging game over UDP Netlist: when exiting the menu for any reason, return 0 instead of following the code and possibly lead to drawing text from a newly free'd pointer - D'OH
This commit is contained in:
parent
8d78876d13
commit
6c4cd7b22e
|
@ -1,5 +1,9 @@
|
|||
D2X-Rebirth Changelog
|
||||
|
||||
20100721
|
||||
--------
|
||||
main/net_udp.c: Fixing crash when joinging game over UDP Netlist: when exiting the menu for any reason, return 0 instead of following the code and possibly lead to drawing text from a newly free'd pointer - D'OH!
|
||||
|
||||
20100720
|
||||
--------
|
||||
main/net_udp.c: Thanks to Marix for hinting me I should not init a pointer with quotes if I plan to allocate/free it... my stupid-level officially broke the record
|
||||
|
|
|
@ -604,6 +604,7 @@ int net_udp_list_join_poll( newmenu *menu, d_event *event, direct_join *dj )
|
|||
break;
|
||||
}
|
||||
case EVENT_WINDOW_CLOSE:
|
||||
{
|
||||
d_free(ljtext);
|
||||
d_free(menus);
|
||||
d_free(dj);
|
||||
|
@ -612,8 +613,8 @@ int net_udp_list_join_poll( newmenu *menu, d_event *event, direct_join *dj )
|
|||
net_udp_close();
|
||||
Network_status = NETSTAT_MENU; // they cancelled
|
||||
}
|
||||
break;
|
||||
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue