GdkPixbufLoader* loader = GDK_PIXBUF_LOADER(RVAL2GOBJ(self));
GError* error = NULL;
FILE* f = fopen(RVAL2CSTR(path), "r");
+ if (!f) {
+ rb_raise(rb_eRuntimeError, "Unable to open file %s for reading", RVAL2CSTR(path));
+ }
counter++;
while ((amount = fread(buf, 1, 65536, f)) > 0) {
if (!gdk_pixbuf_loader_write(loader, (const guchar*) buf, amount, &error)) {