diff --git a/src/sbml/packages/render/sbml/ListOfGlobalRenderInformation.cpp b/src/sbml/packages/render/sbml/ListOfGlobalRenderInformation.cpp index 5e7a877ea..3c8375f0a 100644 --- a/src/sbml/packages/render/sbml/ListOfGlobalRenderInformation.cpp +++ b/src/sbml/packages/render/sbml/ListOfGlobalRenderInformation.cpp @@ -789,6 +789,8 @@ ListOfGlobalRenderInformation::getAllElements(ElementFilter* filter) { List* ret = new List(); List* sublist = ListOf::getAllElements(filter); + ret->transferFrom(sublist); + delete sublist; ADD_FILTERED_POINTER(ret, sublist, mDefaultValues, filter); diff --git a/src/sbml/packages/render/sbml/ListOfLocalRenderInformation.cpp b/src/sbml/packages/render/sbml/ListOfLocalRenderInformation.cpp index 07e18eda2..32f73f3cc 100644 --- a/src/sbml/packages/render/sbml/ListOfLocalRenderInformation.cpp +++ b/src/sbml/packages/render/sbml/ListOfLocalRenderInformation.cpp @@ -760,6 +760,8 @@ ListOfLocalRenderInformation::getAllElements(ElementFilter* filter) { List* ret = new List(); List* sublist = ListOf::getAllElements(filter); + ret->transferFrom(sublist); + delete sublist; ADD_FILTERED_POINTER(ret, sublist, mDefaultValues, filter);