mirror of
https://github.com/glest/glest-source.git
synced 2025-09-01 12:02:36 +02:00
- added proper constructor to init pointers to NULL in case or early game load problems to avoid a crash
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user