- added proper constructor to init pointers to NULL in case or early game load problems to avoid a crash
This commit is contained in:
parent
ed8c08de2f
commit
2605e1c4d7
|
@ -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;
|
||||
|
|
|
@ -60,6 +60,7 @@ private:
|
|||
RandomGen random;
|
||||
|
||||
public:
|
||||
UnitUpdater();
|
||||
void init(Game *game);
|
||||
~UnitUpdater();
|
||||
|
||||
|
|
Loading…
Reference in New Issue