summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index f8cbaa5..ae1bb60 100644
--- a/marshal.c
+++ b/marshal.c
@@ -89,7 +89,7 @@ reentrant_check(obj, sym)
VALUE obj;
ID sym;
{
- if (RBASIC(obj)->klass) {
+ if (obj && RBASIC(obj)->klass) {
rb_raise(rb_eRuntimeError, "%s reentered", rb_id2name(sym));
}
}
@@ -1434,6 +1434,7 @@ marshal_load(argc, argv)
}
arg.src = port;
arg.offset = 0;
+ arg.data = 0;
major = r_byte(&arg);
minor = r_byte(&arg);