|
@@ -3896,9 +3896,10 @@ bool npc_movenpc(struct npc_data* nd, int16 x, int16 y)
|
|
|
void npc_setdisplayname(struct npc_data* nd, const char* newname)
|
|
|
{
|
|
|
nullpo_retv(nd);
|
|
|
+ struct map_data *mapdata = map_getmapdata(nd->bl.m);
|
|
|
|
|
|
safestrncpy(nd->name, newname, sizeof(nd->name));
|
|
|
- if( map_getmapdata(nd->bl.m)->users )
|
|
|
+ if( mapdata && mapdata->users )
|
|
|
clif_name_area(&nd->bl);
|
|
|
}
|
|
|
|