git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42d28d5
)
fixed segv in ruby module
author
Matthias Kramm
<kramm@quiss.org>
Wed, 27 Jan 2010 02:46:06 +0000
(18:46 -0800)
committer
Matthias Kramm
<kramm@quiss.org>
Wed, 27 Jan 2010 02:46:06 +0000
(18:46 -0800)
lib/ruby/gfx.c
patch
|
blob
|
history
diff --git
a/lib/ruby/gfx.c
b/lib/ruby/gfx.c
index
9384d19
..
641388f
100644
(file)
--- a/
lib/ruby/gfx.c
+++ b/
lib/ruby/gfx.c
@@
-215,6
+215,9
@@
static VALUE image_rescale(VALUE cls, VALUE _width, VALUE _height)
Get_Image(image2,v_image2)
image2->doc = image->doc;
image2->image = gfximage_rescale(image->image, width, height);
+ if(!image2->image) {
+ rb_raise(rb_eArgError, "Can't rescale to size %dx%d", width, height);
+ }
return v_image2;
}
static VALUE image_save_jpeg(VALUE cls, VALUE _filename, VALUE quality)