diff options
Diffstat (limited to 'nerv/lib')
-rw-r--r-- | nerv/lib/matrix/generic/matrix.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nerv/lib/matrix/generic/matrix.c b/nerv/lib/matrix/generic/matrix.c index 6cb3dc0..4319e13 100644 --- a/nerv/lib/matrix/generic/matrix.c +++ b/nerv/lib/matrix/generic/matrix.c @@ -4,6 +4,7 @@ /* FIXME: malloc failure detection */ void nerv_matrix_(data_free)(Matrix *self, Status *status) { + if(*self->data_ref == 0) return; assert(*self->data_ref > 0); if (--(*self->data_ref) == 0) { |