Fixing unfreed buffer when credits_show() was called but there was nothing to show me
This commit is contained in:
parent
ee9ac80b62
commit
630048fa99
|
@ -4,6 +4,7 @@ D1X-Rebirth Changelog
|
|||
--------
|
||||
main/net_udp.c, main/net_udp.h: Improved security for UDP protocol: Add checks for correct packet size and - if possible - valid sender address (valid player) and making sure Clients only accept packets meant for Clients and Hosts only accept packets meant for Hosts
|
||||
main/fvi.c, main/physics.c: Bit more safeguarding in find_plane_line_intersection() and as a result less agressive but more beautiful back-bumping on illegal wall interesections; Scaling of movement from PhysTime to FrameTime now done with vector math functions
|
||||
main/credits.c: Fixing unfreed buffer when credits_show() was called but there was nothing to show me
|
||||
|
||||
20110412
|
||||
--------
|
||||
|
|
|
@ -210,7 +210,10 @@ void credits_show(char *credits_filename)
|
|||
char nfile[32];
|
||||
|
||||
if (credits_filename)
|
||||
{
|
||||
d_free(cr);
|
||||
return; //ok to not find special filename
|
||||
}
|
||||
|
||||
tempp = strchr(filename, '.');
|
||||
*tempp = '\0';
|
||||
|
@ -227,6 +230,7 @@ void credits_show(char *credits_filename)
|
|||
pcx_error = pcx_read_bitmap(STARS_BACKGROUND,&cr->backdrop, BM_LINEAR,backdrop_palette);
|
||||
if (pcx_error != PCX_ERROR_NONE) {
|
||||
cfclose(cr->file);
|
||||
d_free(cr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue