Merging r58362 through r58463 from trunk into soc-2013-depsgraph_mt
[blender.git] / source / blender / blenkernel / intern / cdderivedmesh.c
index faa4d8d3071dac29c2a45f4f049ed0ec95d6b4e5..d692e8e0cf77e74e32427bfb03cdcf0bb7b8e5ca 100644 (file)
@@ -1818,7 +1818,13 @@ DerivedMesh *CDDM_from_mesh(Mesh *mesh, Object *UNUSED(ob))
 
 DerivedMesh *CDDM_from_curve(Object *ob)
 {
-       return CDDM_from_curve_displist(ob, &ob->disp);
+       ListBase disp = {NULL, NULL};
+
+       if (ob->curve_cache) {
+               disp = ob->curve_cache->disp;
+       }
+
+       return CDDM_from_curve_displist(ob, &disp);
 }
 
 DerivedMesh *CDDM_from_curve_displist(Object *ob, ListBase *dispbase)