Commit 9d576b4a authored by salix5's avatar salix5

OnEvent()

parent b6e22428
......@@ -943,7 +943,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break;
}
case LOCATION_MZONE: {
if(clicked_card->overlayed.size() == 0)
if(!clicked_card || clicked_card->overlayed.size() == 0)
break;
for(int32 i = 0; i < (int32)clicked_card->overlayed.size(); ++i)
selectable_cards.push_back(clicked_card->overlayed[i]);
......@@ -989,7 +989,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
selectable_cards.clear();
switch(hovered_location) {
case LOCATION_MZONE: {
if(clicked_card->overlayed.size() == 0)
if(!clicked_card || clicked_card->overlayed.size() == 0)
break;
for(int32 i = 0; i < (int32)clicked_card->overlayed.size(); ++i)
selectable_cards.push_back(clicked_card->overlayed[i]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment