diff --git a/src/Image.cc b/src/Image.cc index 727bd37..2a93213 100644 --- a/src/Image.cc +++ b/src/Image.cc @@ -188,9 +188,9 @@ Image::loaded() { void Image::error(Local err) { - if (onerror.IsEmpty()) { - // TODO: - } else { + HandleScope scope; + // TODO: handle exception in onerror segfault + if (!onerror.IsEmpty()) { Local argv[1] = { err }; onerror->Call(Context::GetCurrent()->Global(), 1, argv); }