Search
lxdream.org :: lxdream :: r867:3af8840d5d8c
lxdream 0.9.1
released Jun 29
Download Now
changeset867:3af8840d5d8c
parent866:86cd01c2b2d3
child868:c5b4ed31d819
authornkeynes
dateTue Oct 07 11:14:49 2008 +0000 (11 years ago)
Protect save-state load against corrupt image data
src/pvr2/pvr2.c
1.1 --- a/src/pvr2/pvr2.c Mon Oct 06 01:05:12 2008 +0000
1.2 +++ b/src/pvr2/pvr2.c Tue Oct 07 11:14:49 2008 +0000
1.3 @@ -278,12 +278,15 @@
1.4
1.5 if( has_frontbuffer ) {
1.6 displayed_render_buffer = pvr2_load_render_buffer(f);
1.7 + if( displayed_render_buffer == NULL )
1.8 + return FALSE;
1.9 display_driver->display_render_buffer( displayed_render_buffer );
1.10 count--;
1.11 }
1.12
1.13 for( i=0; i<count; i++ ) {
1.14 - pvr2_load_render_buffer( f );
1.15 + if( pvr2_load_render_buffer( f ) == NULL )
1.16 + return FALSE;
1.17 }
1.18 return TRUE;
1.19 }
.