Bug fix #1903
[blender.git] / source / blender / renderconverter / intern / convertBlenderScene.c
index ab882cd301561904dcfde1f9d08fc9898b2c288e..a487a9b693033e18fc91d2c08b6d7fd930b73820 100644 (file)
@@ -1937,8 +1937,10 @@ static void init_render_surf(Object *ob)
                                if (dl->flag & DL_CYCLIC_V) {
                                        ver= RE_findOrAddVert(R.totvert++);
                                        VECCOPY(ver->co, v1->co);
-                                       ver->orco= orco;
-                                       orco+= 3;
+                                       if(orco) {
+                                               ver->orco= orco;
+                                               orco+= 3;
+                                       }
                                }       
                        }       
 
@@ -1951,9 +1953,10 @@ static void init_render_surf(Object *ob)
                                        v1= RE_findOrAddVert(startvert + v);
                                        ver= RE_findOrAddVert(R.totvert++);
                                        VECCOPY(ver->co, v1->co);
-                                       ver->orco= orco;
-                                       orco +=3;
-
+                                       if(orco) {
+                                               ver->orco= orco;
+                                               orco +=3;
+                                       }
                                }
                                sizeu++;
                        }