diff options
Diffstat (limited to 'src/H5Rint.c')
-rw-r--r-- | src/H5Rint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c index 504ae06..0879f31 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -413,6 +413,7 @@ H5R__destroy(H5R_ref_priv_t *ref) break; case H5R_OBJECT1: case H5R_DATASET_REGION1: + break; case H5R_BADTYPE: case H5R_MAXTYPE: HDassert("invalid reference type" && 0); @@ -423,7 +424,7 @@ H5R__destroy(H5R_ref_priv_t *ref) } /* end switch */ /* Decrement refcount of attached loc_id */ - if((ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0)) + if(ref->type && (ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0)) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed") done: |