mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +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;
|
goto Fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shdr = NULL;
|
||||||
|
|
||||||
/* process subchunks as they're encountered */
|
/* process subchunks as they're encountered */
|
||||||
|
|
||||||
while ( 1 ) {
|
while ( 1 ) {
|
||||||
|
@ -494,6 +496,9 @@ lwSurface *lwGetSurface5( picoMemStream_t *fp, int cksize, lwObject *obj ){
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_SDAT:
|
case ID_SDAT:
|
||||||
|
if ( !shdr ) {
|
||||||
|
goto Fail;
|
||||||
|
}
|
||||||
shdr->data = getbytes( fp, sz );
|
shdr->data = getbytes( fp, sz );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue