use the new CreateElement() virtual method instead than doing it through the Generic() call

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@19 a6f86f6d-0131-4f8e-9e7b-e335508773d5
This commit is contained in:
Steve Lhomme
2010-03-15 16:20:08 +00:00
parent 995bc139c4
commit c331b9b443

View File

@@ -335,9 +335,9 @@ EbmlElement *EbmlMaster::FindNextElt(const EbmlElement & PastElt, bool bCreateIf
if (Index != ElementList.size())
return ElementList[Index];
if (bCreateIfNull && PastElt.Generic().Create != NULL) {
if (bCreateIfNull) {
// add the element
EbmlElement *NewElt = &(PastElt.Generic().Create());
EbmlElement *NewElt = &(PastElt.CreateElement());
if (NewElt == NULL)
return NULL;