--- deliantra/server/common/image.C 2007/03/14 00:04:58 1.20 +++ deliantra/server/common/image.C 2007/04/12 14:18:04 1.23 @@ -22,7 +22,6 @@ * The maintainer of this code can be reached at */ - #include #include @@ -77,6 +76,9 @@ faceidx face_find (const char *name, faceidx defidx) { + if (!name) + return defidx; + facehash_t::iterator i = facehash.find (name); return i == facehash.end () @@ -86,6 +88,8 @@ faceinfo * face_info (faceidx idx) { + assert (0 < (faceidx)-1); // faceidx must be unsigned + if (idx >= faces.size ()) return 0;