Check model index

Description

Add an explict check for -1 which is the error value for finding a free model instance

Merge Request Steps

Please confirm that this pull request has done the following:

  • Tests added
  • Documentation added (where applicable)
  • Changelog item added to changelog/.

Merge request reports

Loading