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
5c2fdc5063
commit
b41faef1d3
|
@ -1,5 +1,9 @@
|
||||||
D1X-Rebirth Changelog
|
D1X-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
|
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
|
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
|
||||||
|
|
|
@ -580,6 +580,7 @@ int net_udp_list_join_poll( newmenu *menu, d_event *event, direct_join *dj )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EVENT_WINDOW_CLOSE:
|
case EVENT_WINDOW_CLOSE:
|
||||||
|
{
|
||||||
d_free(ljtext);
|
d_free(ljtext);
|
||||||
d_free(menus);
|
d_free(menus);
|
||||||
d_free(dj);
|
d_free(dj);
|
||||||
|
@ -588,8 +589,8 @@ int net_udp_list_join_poll( newmenu *menu, d_event *event, direct_join *dj )
|
||||||
net_udp_close();
|
net_udp_close();
|
||||||
Network_status = NETSTAT_MENU; // they cancelled
|
Network_status = NETSTAT_MENU; // they cancelled
|
||||||
}
|
}
|
||||||
break;
|
return 0;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue