Fixed possible NULL pointer dereference.

A wrong variable was used for output, which could lead to NULL pointer
dereference.

Signed-off-by: Daniel S. Reichenbach <daniel@kogitoapp.com>
Added missing bounds check in loop.

Missing bounds check for extra iterator increment in loop was added.

Signed-off-by: Daniel S. Reichenbach <daniel@kogitoapp.com>
Compiler warning for asserts fixed.

The asserts have been combined with a string which always resolved
to true. The strings have been moved to code comments.

Signed-off-by: Daniel S. Reichenbach <daniel@kogitoapp.com>
Closed memory leaks and compiler warnings.

A bunch of memory leaks and compiler warnings have been resolved. We
are heading towards a warning free build.

Signed-off-by: Daniel S. Reichenbach <daniel@kogitoapp.com>
Make Windows compilers happy.

Signed-off-by: Daniel S. Reichenbach <daniel@kogitoapp.com>
Added fix for issue 1107254 on Coverity Scan.

The system resource will not be reclaimed and reused, reducing the
future availability of the resource.

In MMAP::​TerrainBuilder::​loadMap(unsigned int, unsigned int,
unsigned int, MMAP::​MeshData &, MMAP::​Spot):

Leak of memory or pointers to system resources (CWE-404)

Signed-off-by: Daniel S. Reichenbach <daniel@kogitoapp.com>
Added fix for issue 1107255 on Coverity Scan.

The system resource will not be reclaimed and reused, reducing the
future availability of the resource.

In MMAP::​MMapManager::​loadMapData(unsigned int):

Leak of memory or pointers to system resources (CWE-404)

Signed-off-by: Daniel S. Reichenbach <daniel@kogitoapp.com>
Added a missing check.

Signed-off-by: Daniel S. Reichenbach <daniel@kogitoapp.com>
Backport recastnavigation revision 253.

Treat region borders as empty in floodRegions() to allow 1 width
regions to grow next to tile border. Made area marking code not to
override RC_NULL_AREA.

Signed-off-by: Daniel S. Reichenbach <daniel@kogitoapp.com>