diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c index 769e815e751..54566b08e87 100644 --- a/dlls/d3dxof/parsing.c +++ b/dlls/d3dxof/parsing.c @@ -1349,7 +1349,8 @@ _exit: return FALSE; } - buf->pxo = buf->pxo->children[buf->pxo->nb_children] = &buf->pxo_tab[buf->pxo->root->nb_subobjects++]; + buf->pxo = buf->pxo->children[buf->pxo->nb_children] = &buf->pxo_tab[buf->pxo->root->nb_subobjects]; + pxo->root->nb_subobjects++; TRACE("Enter optional %s\n", (char*)buf->value); buf->level++;