diff options
author | rodri <rgl@antares-labs.eu> | 2024-02-20 16:50:13 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-02-20 16:50:13 +0000 |
commit | ad65ff69d3ddeaf3b34cc9038bc28e79692f9656 (patch) | |
tree | 4c0b097e5c1c1fb7531e92b5a1ac96d030c3b826 | |
parent | b4a0229a2dadca8c4d3a94d3e7176d022f09ec82 (diff) | |
download | libobj-ad65ff69d3ddeaf3b34cc9038bc28e79692f9656.tar.gz libobj-ad65ff69d3ddeaf3b34cc9038bc28e79692f9656.tar.bz2 libobj-ad65ff69d3ddeaf3b34cc9038bc28e79692f9656.zip |
don't try to find a material when the list is empty.
-rw-r--r-- | obj.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -738,7 +738,7 @@ Line2: *p++ = c; }while(c = Bgetc(bin), (isalnum(c) || c == '.' || c == '_') && p-buf < sizeof(buf)-1); *p = 0; - if((m = getmtl(obj->materials, buf)) == nil){ + if(obj->materials != nil && (m = getmtl(obj->materials, buf)) == nil){ error("no material '%s' found", buf); goto error; } |