Skip to content

Commit eae8f92

Browse files
committed
throw an error for bad flag
1 parent 4721271 commit eae8f92

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/vips/gvalue.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def self.flags_from_nick(gtype, value)
6363
if item.is_a? String
6464
name = item.tr("_", "-")
6565
item = Vips.vips_flags_from_nick "ruby-vips", gtype, name
66+
if item == -1
67+
raise Vips::Error
68+
end
6669
end
6770

6871
result |= item

0 commit comments

Comments
 (0)