Skip to content

SBMLReactionConverter::setDocument will crash on document with NULL model / after conversionn we need to set oundaryCondition to false #453

@fbergmann

Description

@fbergmann

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;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions