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:
authorCampbell Barton <ideasman42@gmail.com>2008-05-29 01:15:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-05-29 01:15:40 +0400
commit1a5181c9c71802309b9947456e528cb5ee644d5e (patch)
treecda82d2f5bba6196febc1275325bdf58bb742c93 /source/blender/src/drawview.c
parent04067c183305c31b1f5f9e7ccfe1e6c8af89e5b8 (diff)
bugfix for own bug. mousewheel while playing in the sequencer crashes blender.
Diffstat (limited to 'source/blender/src/drawview.c')
-rw-r--r--source/blender/src/drawview.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index 52e0d3d6f05..e83ecb13960 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -3732,18 +3732,22 @@ int play_anim(int mode)
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);
}