New Aspose.word table.Autofit error

In the newest version of Aspose.word
the code below throws the error below.

//Create a new table
Table table = new Table(doc);
doc.LastSection.Body.AppendChild(table);
//Create a table row
Row row = new Row(doc);
row.RowFormat.AllowBreakAcrossPages = true;
//Add row to table
table.AppendChild(row);
table.AutoFit(AutoFitBehavior.AutoFitToWindow);

Okay, looks like I was able to fix it by appending a cell to the row before trying to call table.Autofit

@dmerkle1 The provided code does not create a valid table. There must be at least one cell in the table.