Fix 'hard crash' part of T45768 (when merging all vertices of a mesh, we have no more edges to draw).

This commit is contained in:
Bastien Montagne
2015-08-12 11:42:35 +02:00
parent 8a2371e408
commit 4eefba091d
@@ -1834,7 +1834,7 @@ static void ccgDM_drawEdges(DerivedMesh *dm, bool drawLooseEdges, bool drawAllEd
}
}
if (ccgdm->drawInteriorEdges) {
if (gdo->edges && ccgdm->drawInteriorEdges) {
GPU_buffer_draw_elements(gdo->edges, GL_LINES, gdo->interior_offset * 2, gdo->totinterior * 2);
}
GPU_buffers_unbind();