Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-06-28 07:26:10 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-28 07:26:10 +0400
commit500507ddb1efdf9f69d8a61e3d03a855ee017902 (patch)
tree2a243c975661b12ff7e66289b714c71b7234f13e /source/blender/editors/interface/view2d.c
parent61e30f0f001285dcbf0c7ec8ba44151544bfc8d9 (diff)
parent7271f86be58d0705dd5abc01ac508e1775951fa8 (diff)
NLA SoC: Merge from 2.5 - 21179 to 21209
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index aa1cc5790ef..c32c8c817fb 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -333,6 +333,12 @@ void UI_view2d_curRect_validate(View2D *v2d)
if (v2d->keepzoom & V2D_LOCKZOOM_Y)
height= winy;
+ /* values used to divide, so make it safe */
+ if(width<1) width= 1;
+ if(height<1) height= 1;
+ if(winx<1) winx= 1;
+ if(winy<1) winy= 1;
+
/* keepzoom (V2D_KEEPZOOM set), indicates that zoom level on each axis must not exceed limits
* NOTE: in general, it is not expected that the lock-zoom will be used in conjunction with this
*/