- added proper constructor to init pointers to NULL in case or early game load problems to avoid a crash

This commit is contained in:
Mark Vejvoda 2010-07-30 01:19:31 +00:00
parent ed8c08de2f
commit 2605e1c4d7
2 changed files with 13 additions and 0 deletions

View File

@ -43,6 +43,18 @@ namespace Glest{ namespace Game{
// ===================== PUBLIC ========================
UnitUpdater::UnitUpdater() {
this->game= NULL;
this->gui= NULL;
this->gameCamera= NULL;
this->world= NULL;
this->map= NULL;
this->console= NULL;
this->scriptManager= NULL;
this->routePlanner = NULL;
this->pathFinder = NULL;
}
void UnitUpdater::init(Game *game){
this->game= game;

View File

@ -60,6 +60,7 @@ private:
RandomGen random;
public:
UnitUpdater();
void init(Game *game);
~UnitUpdater();