Fix #35683: Addon working fine in console. But crashed when click GUI button.
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 10 Jun 2013 09:45:51 +0000 (09:45 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 10 Jun 2013 09:45:51 +0000 (09:45 +0000)
commit84429e5d39fc6f0923794484f17d886aa212be69
tree10aca14be684f86cde6ab199d0717b4131c8d048
parentcae0d9df523f9bb0a19a9487541be3d05197b940
Fix #35683: Addon working fine in console. But crashed when click GUI button.

Crash happened in ED_view3d_calc_zfac and happend in cases operator was invoked
from a region different from RGN_TYPE_WINDOW.

For a transformation zfac is only used in convertViewVec in cases region is
RGN_TYPE_WINDOW, so solved by just adding extra check in calculateCenter
for this particular case.
source/blender/editors/transform/transform_generics.c