mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-09 11:30:51 +00:00
Merge pull request #372 from Pan7/fixlwo
Fix for potentially using uninitialized variable
This commit is contained in:
commit
a6d10074b7
2 changed files with 7 additions and 0 deletions
|
@ -75,6 +75,8 @@ lwEnvelope *lwGetEnvelope( picoMemStream_t *fp, int cksize ){
|
|||
goto Fail;
|
||||
}
|
||||
|
||||
key = NULL;
|
||||
|
||||
/* process subchunks as they're encountered */
|
||||
|
||||
while ( 1 ) {
|
||||
|
|
|
@ -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