Fixed GameLogic crash on exit

Added "Null" checks on critical places (CardID(0))