fix bad uses of sizeof() with memory allocation.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58207 954f8c5b-7b00-dc11-b283-0030488c597c
fix for misc errors
- reference to out of scope stack var
- freeing fixes size array (never allocated)
- add matching va_end for va_start


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58208 954f8c5b-7b00-dc11-b283-0030488c597c
fix errors in code
- BKE_mball_center_median(), didn't work.
- clip_refresh was removing handlers from wrong space.
- new_modifier, replace strcpy with BLI_strncpy


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58209 954f8c5b-7b00-dc11-b283-0030488c597c
remove redundant null checks and avoid divide by zero in driver evaluation


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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58211 954f8c5b-7b00-dc11-b283-0030488c597c
fix for orthogonalize_m3,4, missing break statements in switch.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58212 954f8c5b-7b00-dc11-b283-0030488c597c
fix for missing break with compositor levels (blue passed through to luminance)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58213 954f8c5b-7b00-dc11-b283-0030488c597c
fix for 2 bugs in animation playback
- reading bmp images was failing (needed to increase the size of the header to 64 bytes)
- the dnd image was being incorrectly checked (was always returning true even when none was used).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58214 954f8c5b-7b00-dc11-b283-0030488c597c
remove NULL checks on fixed size arrays, also was calling BLI_testextensie_glob every time in the file selector with a blank string.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58215 954f8c5b-7b00-dc11-b283-0030488c597c
correct bad allocation sizes, unwrap was over-allocating, makesdna was under allocating.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58216 954f8c5b-7b00-dc11-b283-0030488c597c
fix for missing break statements in switch, some key shortcuts and notifiers were falling through when its obviously incorrect to do so.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58217 954f8c5b-7b00-dc11-b283-0030488c597c
fix for more errors with switch missing break
- boids random option was falling through to average.
- (NC_OBJECT | ND_DRAW) notifier was falling through to ND_SHADING button preview updates.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58218 954f8c5b-7b00-dc11-b283-0030488c597c
fix for bad NULL check in bmo_connect_pair, also remove duplicate checks in if statements and redundant initialization vars.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@58219 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for [#35482] 2.67 freestyle line visibility computation bug.

The reported line visibility issue was caused by a wrong calculation of a 2D
bounding box (so-called "proscenium face" in Freestyle) in the case of a
spherical grid data structure used for a perspective camera.  The problem was
resulting from the proscenium computation based on two corners (min and max)
of the 3D bounding box of imported mesh data.  Aware of the spherical coordinate
transformation involving non-linear (arctangent) functions, now the proscenium
is computed by taking in account all the eight corners of the 3D bounding box.

Also added minor code changes to facilitate future debugging.

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