fixed bug where reading en empty job list played with a null pointer

develop
doomchild 2010-08-19 12:45:43 -05:00
parent fd872922a5
commit 464919635f
1 changed files with 3 additions and 0 deletions

@ -81,6 +81,9 @@ t_material* Creatures_ReadJob(DFHackObject* cPtr, const t_creature* furball)
if(((DFHack::Creatures*)cPtr)->ReadJob(furball, mat))
{
if(mat.size() <= 0)
return NULL;
t_material* buf;
(*alloc_t_material_buffer_callback)(buf, mat.size());