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>2007-03-14 12:08:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-03-14 12:08:41 +0300
commit6b584a650411b9dc6da6b475008a9a01fb7f70ed (patch)
tree524986befb1d47c34c1dd5dfab6f14880491e1d2 /source/blender/src/editmball.c
parent5d234230bf803354e6f99ab74ab8b4cea62f498b (diff)
many menu items would crash blender if there was no 3d view. added checks.
Diffstat (limited to 'source/blender/src/editmball.c')
-rw-r--r--source/blender/src/editmball.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/src/editmball.c b/source/blender/src/editmball.c
index f92a341c2b3..1bde0eca710 100644
--- a/source/blender/src/editmball.c
+++ b/source/blender/src/editmball.c
@@ -166,12 +166,14 @@ void add_primitiveMball(int dummy_argument)
cent[1]-= G.obedit->obmat[3][1];
cent[2]-= G.obedit->obmat[3][2];
- Mat3CpyMat4(imat, G.vd->viewmat);
- Mat3MulVecfl(imat, cent);
- Mat3MulMat3(cmat, imat, mat);
- Mat3Inv(imat,cmat);
+ if (G.vd) {
+ Mat3CpyMat4(imat, G.vd->viewmat);
+ Mat3MulVecfl(imat, cent);
+ Mat3MulMat3(cmat, imat, mat);
+ Mat3Inv(imat,cmat);
- Mat3MulVecfl(imat, cent);
+ Mat3MulVecfl(imat, cent);
+ }
ml= MEM_callocN(sizeof(MetaElem), "metaelem");
BLI_addtail(&editelems, ml);