Fix bug #1356: .obj loading bug in picolib

There's a bug in picolib when parsing the first group in an .obj file.

The library tries to set the surface name to a surface pointer
that is still NULL.

This gets silently ignored but the problem reappears later
in a warning message when the material or a face is parsed.
This commit is contained in:
Nodenum 2012-12-17 09:32:19 +01:00 committed by Rudolf Polzer
parent 646e93a73b
commit 805046c354

View File

@ -676,7 +676,7 @@ static picoModel_t *_obj_load( PM_PARAMS_LOAD ){
#endif
}
if ( curFace == 0 ) {
if ( curFace == 0 && curSurface != NULL ) {
PicoSetSurfaceName( curSurface,groupName );
}
else