diff options
Diffstat (limited to 'engines/sword25/math')
-rw-r--r-- | engines/sword25/math/geometry_script.cpp | 2 | ||||
-rw-r--r-- | engines/sword25/math/region.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/sword25/math/geometry_script.cpp b/engines/sword25/math/geometry_script.cpp index 7a0fcd8188..f01f977f4a 100644 --- a/engines/sword25/math/geometry_script.cpp +++ b/engines/sword25/math/geometry_script.cpp @@ -202,7 +202,7 @@ static unsigned int TableRegionToRegion(lua_State *L, const char *ClassName) { return 0; } - unsigned int RegionHandle; + unsigned int RegionHandle = 0; if (!strcmp(ClassName, REGION_CLASS_NAME)) { RegionHandle = BS_Region::Create(BS_Region::RT_REGION); } else if (!strcmp(ClassName, WALKREGION_CLASS_NAME)) { diff --git a/engines/sword25/math/region.cpp b/engines/sword25/math/region.cpp index 4999a4340e..bab5381990 100644 --- a/engines/sword25/math/region.cpp +++ b/engines/sword25/math/region.cpp @@ -60,7 +60,7 @@ BS_Region::BS_Region(BS_InputPersistenceBlock &Reader, unsigned int Handle) : m_ // ----------------------------------------------------------------------------- unsigned int BS_Region::Create(REGION_TYPE Type) { - BS_Region * RegionPtr; + BS_Region * RegionPtr = NULL; switch (Type) { case RT_REGION: RegionPtr = new BS_Region(); @@ -85,7 +85,7 @@ unsigned int BS_Region::Create(BS_InputPersistenceBlock & Reader, unsigned int H Reader.Read(Type); // Depending on the type, create a new BS_Region or BS_WalkRegion object - BS_Region * RegionPtr; + BS_Region *RegionPtr = NULL; if (Type == RT_REGION) { RegionPtr = new BS_Region(Reader, Handle); } else if (Type == RT_WALKREGION) { |