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:
Diffstat (limited to 'source/blender/editors/metaball')
-rw-r--r--source/blender/editors/metaball/mball_edit.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index adffe16ca18..b79eeee49d7 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -501,19 +501,13 @@ bool mouse_mball(bContext *C, const int mval[2], bool extend, bool deselect, boo
/* free all MetaElems from ListBase */
static void freeMetaElemlist(ListBase *lb)
{
- MetaElem *ml, *next;
+ MetaElem *ml;
if (lb == NULL) return;
- ml = lb->first;
- while (ml) {
- next = ml->next;
- BLI_remlink(lb, ml);
+ while ((ml = BLI_pophead(lb))) {
MEM_freeN(ml);
- ml = next;
}
-
- lb->first = lb->last = NULL;
}