setDocument needs to check whether the model is valid before dereferencing
int
SBMLReactionConverter::setDocument(SBMLDocument* doc)
{
if (SBMLConverter::setDocument(doc) == LIBSBML_OPERATION_SUCCESS)
{
if (mDocument != NULL)
{
mOriginalModel = mDocument->getModel()->clone(); // <-- this will crash on NULL model, which can happen
return LIBSBML_OPERATION_SUCCESS;
}
setDocument needs to check whether the model is valid before dereferencing