aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge2/cge2_main.cpp1
-rw-r--r--engines/cge2/hero.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index 0fc2d5af71..5fa44531df 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -733,6 +733,7 @@ void CGE2Engine::loadPos() {
EncryptedStream file(this, "CGE.HXY");
for (int cav = 0; cav < kSceneMax; cav++) {
+ _heroTab[0]->_posTab[cav] = new V2D(this);
_heroTab[0]->_posTab[cav]->x = file.readSint16LE();
_heroTab[0]->_posTab[cav]->y = file.readSint16LE();
}
diff --git a/engines/cge2/hero.h b/engines/cge2/hero.h
index 628f7c1580..7ddc871e06 100644
--- a/engines/cge2/hero.h
+++ b/engines/cge2/hero.h
@@ -52,7 +52,7 @@ struct HeroTab {
_pocket[i] = nullptr;
_pocPtr = 0;
for (int i = 0; i < kSceneMax; i++)
- _posTab[i] = new V2D(vm);
+ _posTab[i] = nullptr;
}
~HeroTab() {
for (int i = 0; i < kSceneMax; i++)