diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 824825fe7..3e69f1067 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -1045,7 +1045,7 @@ static int libd_getColormap(lua_State *L) skinnum = i; } - if (demo.playback) + if (demo.playback && skinnum >= 0) skinnum = demo.skinlist[skinnum].mapping; // all was successful above, now we generate the colormap at last!