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>2010-04-21 18:46:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-21 18:46:32 +0400
commitec9f2af65976bac519fcf52e0dfe596ddc170e5e (patch)
treeb3a4dd4c97d47fa25ba65937441fb017a837a71f /source/blender/editors/space_view3d/drawobject.c
parentfba7ebcbea35d3b14f535f7f7a50c61074ae7092 (diff)
fix for crash drawing weights in lattice editmode.
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index d47992810f3..cc3b572835a 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1405,14 +1405,16 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
Lattice *lt= ob->data;
DispList *dl;
int u, v, w;
- int use_wcol= 0;
+ int use_wcol= 0, is_edit= (lt->editlatt != NULL);
/* now we default make displist, this will modifiers work for non animated case */
if(ob->disp.first==NULL)
lattice_calc_modifiers(scene, ob);
dl= find_displist(&ob->disp, DL_VERTS);
- if(lt->editlatt) {
+ if(is_edit) {
+ lt= lt->editlatt;
+
cpack(0x004000);
if(ob->defbase.first && lt->dvert) {
@@ -1421,8 +1423,6 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
}
}
- if(lt->editlatt) lt= lt->editlatt;
-
glBegin(GL_LINES);
for(w=0; w<lt->pntsw; w++) {
int wxt = (w==0 || w==lt->pntsw-1);
@@ -1452,7 +1452,7 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
if(use_wcol)
glShadeModel(GL_FLAT);
- if( ((Lattice *)ob->data)->editlatt ) {
+ if(is_edit) {
if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
lattice_draw_verts(lt, dl, 0);