summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-02 23:50:34 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-02 23:50:34 +0900
commit8d0cc57a43ba71e0f8b113069a01d08cd8b0d8ec (patch)
treed7a88aa076a35951ad211ebd2b6aa70c488fef5e /src
parent090e896d48978def36bf9e2e2482186bf15f5917 (diff)
downloadmruby-8d0cc57a43ba71e0f8b113069a01d08cd8b0d8ec.tar.gz
mruby-8d0cc57a43ba71e0f8b113069a01d08cd8b0d8ec.zip
hash->ht might be NULL; it shouldn't though
Diffstat (limited to 'src')
-rw-r--r--src/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hash.c b/src/hash.c
index c61a6f7b5..4c7a64dea 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -701,7 +701,7 @@ mrb_hash_clear(mrb_state *mrb, mrb_value hash)
{
khash_t(ht) *h = RHASH_TBL(hash);
- kh_clear(ht, h);
+ if (h) kh_clear(ht, h);
return hash;
}