if(actors_list[i]->k) {
if(actors_list[i]->k != NULL) {
void destroy_all_actors(){     int i = 0;     struct kill_queue *tofree;          first_node = last_node = NULL;          if(debug >= DEBUG_LOW)log_info("Destroy all actors.\n");                    for(i=0;i<max_actors;i++)		{			if(actors_list[i])				{                     actors_list[i]->actor_id=NULL;	                 actors_list[i]->x_tile_pos=NULL;	                 actors_list[i]->y_tile_pos=NULL;	                 actors_list[i]->actor_type=NULL;	                 actors_list[i]->fighting=NULL;	                                      if(actors_list[i]->k) {                          tofree = actors_list[i]->k;                          tofree->prev=NULL;                          tofree->next=NULL;                          tofree->k=NULL;                          tofree->time=NULL;                          free(tofree);                     }                                                      actors_list[i]->k = tofree = NULL;                     	                 free(actors_list[i]);                     actors_list[i]=NULL;                }        }        max_actors = 0;        if(debug >= DEBUG_LOW)log_info("Finished destroying all actors.\n");    }