Fix #27912: crash after mesh.materials.pop().
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 11 Jul 2011 09:08:08 +0000 (09:08 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 11 Jul 2011 09:08:08 +0000 (09:08 +0000)
source/blender/blenkernel/intern/material.c

index 2f29074834b825fe981a9d8b579ae0d4c462de10..962c7fd5e863caf6b60aa7f80673b7d5304ce678 100644 (file)
@@ -550,7 +550,7 @@ Material *material_pop_id(ID *id, int index)
                                Material **mat;
 
                                if(index + 1 != (*totcol))
-                                       memmove((*matar), (*matar) + 1, (*totcol) - (index + 1));
+                                       memmove((*matar), (*matar) + 1, sizeof(void *) * ((*totcol) - (index + 1)));
 
                                (*totcol)--;