@@ -57,6 +57,11 @@ void card_location_base::on_message(zloop<task*> * loop,const message_locinfo&lo
m_time = loc.m_time_stamp;
auto site_ptr = sit_list::instance()->get(loc.m_site_id);
+ if(!site_ptr)
+ {
+ return;
+ }
+
if(site_ptr->is_up_site())
{
auto area_tool=get_area_tool();
@@ -44,6 +44,9 @@ struct monkey_fit
s-=it->second; ++it;
}
+ if(p.empty())
+ return 0;
std::sort(p.begin(),p.end(),[](const std::tuple<T,T,int>&l,const std::tuple<T,T,int>&r){
return 1.*std::get<2>(l) > 1.*std::get<2>(r);
});