diff options
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/models.c b/src/models.c index 380d8cf..89ea810 100644 --- a/src/models.c +++ b/src/models.c @@ -1661,7 +1661,7 @@ int lmodelsCreateMaterial( lua_State *L ) { lua_pushnil( L ); while ( lua_next( L, t4 ) != 0 ) { - if ( strcmp( "texture", (char*)lua_tostring( L, -2 ) ) == 0 && lua_isnumber( L, -1 ) ) { + if ( strcmp( "texture", (char*)lua_tostring( L, -2 ) ) == 0 && isValidTexture( L, lua_gettop( L ), true ) ) { state->materials[i]->maps[map].texture = uluaGetTexture( L, lua_gettop( L ) ); } else if ( strcmp( "color", (char*)lua_tostring( L, -2 ) ) == 0 && lua_istable( L, -1 ) ) { |
