mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-24 10:21:29 +00:00
Fix gcc warning shdr may be used uninitialized
This commit is contained in:
parent
282f33d813
commit
d089ba9454
1 changed files with 5 additions and 0 deletions
|
@ -244,6 +244,8 @@ lwSurface *lwGetSurface5( picoMemStream_t *fp, int cksize, lwObject *obj ){
|
|||
goto Fail;
|
||||
}
|
||||
|
||||
shdr = NULL;
|
||||
|
||||
/* process subchunks as they're encountered */
|
||||
|
||||
while ( 1 ) {
|
||||
|
@ -494,6 +496,9 @@ lwSurface *lwGetSurface5( picoMemStream_t *fp, int cksize, lwObject *obj ){
|
|||
break;
|
||||
|
||||
case ID_SDAT:
|
||||
if ( !shdr ) {
|
||||
goto Fail;
|
||||
}
|
||||
shdr->data = getbytes( fp, sz );
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue