summaryrefslogtreecommitdiff
path: root/transcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/transcode.c b/transcode.c
index 3dfca27d01..e7c66ff425 100644
--- a/transcode.c
+++ b/transcode.c
@@ -2304,8 +2304,10 @@ rb_econv_prepare_opts(VALUE opthash, VALUE *opts)
{
int ecflags;
VALUE newhash = Qnil;
- if (NIL_P(opthash))
- return Qnil;
+ if (NIL_P(opthash)) {
+ *opts = Qnil;
+ return 0;
+ }
ecflags = econv_opts(opthash);
if ((ecflags & ECONV_INVALID_MASK) == ECONV_INVALID_REPLACE ||