avoid using MEM_reallocN_id directly, add utility macro for freeing.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58887 954f8c5b-7b00-dc11-b283-0030488c597c
avoid freeing NULL pointer for navmesh BuildVertIndArrays and dont truncate memset arg.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58888 954f8c5b-7b00-dc11-b283-0030488c597c
fix navmesh, error was introduced by r58420 looks like changes weren't tested.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58890 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: replace strncpy -> BLI_strncpy, skip first 2 chars when making a hash from the object name.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58891 954f8c5b-7b00-dc11-b283-0030488c597c
KX_ObstacleSimulation: replace inline math functions with BLI_math functions


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58892 954f8c5b-7b00-dc11-b283-0030488c597c
fix read outside buffer range KX_ObstacleSimulationTOI_rays::sampleRVO,
Was using 3d vectors for 2d operations, passing float[2] to args that use MT_Vector3 was reading the 3rd value of a 2d array


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58894 954f8c5b-7b00-dc11-b283-0030488c597c
add missing NULL check in RB_dworld_export if fopen fails.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58895 954f8c5b-7b00-dc11-b283-0030488c597c
Cycles / OpenCL:
* Was broken after Blackbody merge, forgot to rename a struct...



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58900 954f8c5b-7b00-dc11-b283-0030488c597c
fix for BL_ArmatureConstraint::UpdateTarget(), was getting the pose from the target, not the subtarget.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58903 954f8c5b-7b00-dc11-b283-0030488c597c
fix memory leak in KX_ObstacleSimulation


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58904 954f8c5b-7b00-dc11-b283-0030488c597c
more consistent use of checks of BLI_open(), check 'fd < 0' rather then -1. packedfile incorrectly treated 0 as an error value. best not be vague/sloppy with this.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58905 954f8c5b-7b00-dc11-b283-0030488c597c
Support WITH_CXX_GUARDEDALLOC for dualcon library


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58906 954f8c5b-7b00-dc11-b283-0030488c597c
fix for 2 memory leaks in dualcon library, quite bad since they leaked on every evaluation.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58907 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: replace strcpy with BLI_strncpy for fixed size strings, and correct some harmless but incorrect sizeof() use


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58908 954f8c5b-7b00-dc11-b283-0030488c597c
add c++/guardedalloc to more freestyle classes, also remove redundant 'public:'


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58909 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: remove redundant NULL checks


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58910 954f8c5b-7b00-dc11-b283-0030488c597c
mempool api cleanup: differentiate mempool functions that allocate a pointer lookup table from allocating the data as a contiguous array,
call these functions BLI_mempool_as_table(), BLI_mempool_as_array(), the N prefixed versions of these functions return newly allocated arrays.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58911 954f8c5b-7b00-dc11-b283-0030488c597c