[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15032] trunk/blender/source/blender/src/ drawview.c: bugfix for own bug.
Campbell Barton
ideasman42 at gmail.com
Wed May 28 23:15:40 CEST 2008
Revision: 15032
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15032
Author: campbellbarton
Date: 2008-05-28 23:15:40 +0200 (Wed, 28 May 2008)
Log Message:
-----------
bugfix for own bug. mousewheel while playing in the sequencer crashes blender.
Modified Paths:
--------------
trunk/blender/source/blender/src/drawview.c
Modified: trunk/blender/source/blender/src/drawview.c
===================================================================
--- trunk/blender/source/blender/src/drawview.c 2008-05-28 18:11:45 UTC (rev 15031)
+++ trunk/blender/source/blender/src/drawview.c 2008-05-28 21:15:40 UTC (rev 15032)
@@ -3732,18 +3732,22 @@
else viewmove(0);
}
} else if (event==WHEELDOWNMOUSE || (val && event==PADMINUS)) { /* copied from persptoetsen */
- /* this min and max is also in viewmove() */
- if(G.vd->persp==V3D_CAMOB) {
- G.vd->camzoom-= 10;
- if(G.vd->camzoom<-30) G.vd->camzoom= -30;
+ if (G.vd) { /* when using the sequencer this can be NULL */
+ /* this min and max is also in viewmove() */
+ if(G.vd->persp==V3D_CAMOB) {
+ G.vd->camzoom-= 10;
+ if(G.vd->camzoom<-30) G.vd->camzoom= -30;
+ }
+ else if(G.vd->dist<10.0*G.vd->far) G.vd->dist*=1.2f;
}
- else if(G.vd->dist<10.0*G.vd->far) G.vd->dist*=1.2f;
} else if (event==WHEELUPMOUSE || (val && event==PADPLUSKEY)) { /* copied from persptoetsen */
- if(G.vd->persp==V3D_CAMOB) {
- G.vd->camzoom+= 10;
- if(G.vd->camzoom>300) G.vd->camzoom= 300;
+ if (G.vd) {
+ if(G.vd->persp==V3D_CAMOB) {
+ G.vd->camzoom+= 10;
+ if(G.vd->camzoom>300) G.vd->camzoom= 300;
+ }
+ else if(G.vd->dist> 0.001*G.vd->grid) G.vd->dist*=.83333f;
}
- else if(G.vd->dist> 0.001*G.vd->grid) G.vd->dist*=.83333f;
} else if(event==MKEY) {
if(val) add_marker(CFRA-1);
}
More information about the Bf-blender-cvs
mailing list