Commit 296c776
committed
Fix crash for models without state variables
Previously, `nx_solver=0` would have in a crash when calling `amici::SUNMatrixWrapper::capacity` on `SUNMatrixWrapper` of 0-sized sparse matrix.
Unrelated: Replace some unnecessary `std::vector::at` calls.1 parent 9ea6aef commit 296c776
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2875 | 2875 | | |
2876 | 2876 | | |
2877 | 2877 | | |
| 2878 | + | |
| 2879 | + | |
2878 | 2880 | | |
2879 | 2881 | | |
2880 | 2882 | | |
2881 | 2883 | | |
2882 | 2884 | | |
2883 | 2885 | | |
2884 | 2886 | | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
2888 | 2887 | | |
2889 | 2888 | | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
2890 | 2893 | | |
2891 | | - | |
2892 | | - | |
2893 | | - | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
2894 | 2897 | | |
2895 | 2898 | | |
2896 | | - | |
| 2899 | + | |
2897 | 2900 | | |
2898 | 2901 | | |
2899 | 2902 | | |
| |||
0 commit comments