summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-08-22 11:17:37 +0900
committerYukihiro Matsumoto <[email protected]>2012-08-22 11:17:37 +0900
commitd1f2841660ac4a020b2dfd763ee6a204d6b81577 (patch)
tree941f88adbd6be16612c4dd27fe5e0be0c52ab8e5
parent72bc9c8e46931abafb22f70f4b6a755766a773aa (diff)
downloadmruby-d1f2841660ac4a020b2dfd763ee6a204d6b81577.tar.gz
mruby-d1f2841660ac4a020b2dfd763ee6a204d6b81577.zip
abort() if mrb->jmp is empty
-rw-r--r--src/error.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/error.c b/src/error.c
index fd17e6697..412a63d3e 100644
--- a/src/error.c
+++ b/src/error.c
@@ -164,6 +164,9 @@ void
mrb_exc_raise(mrb_state *mrb, mrb_value exc)
{
mrb->exc = (struct RObject*)mrb_object(exc);
+ if (!mrb->jmp) {
+ abort();
+ }
longjmp(*(jmp_buf*)mrb->jmp, 1);
}