mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
Fix texmod.colorize
crash if ratio
is nil
This commit is contained in:
parent
73640f11d1
commit
5dc6307661
@ -297,7 +297,7 @@ function texmod:colorize(color, ratio)
|
|||||||
if ratio == "alpha" then
|
if ratio == "alpha" then
|
||||||
assert(color.alpha or 0xFF == 0xFF)
|
assert(color.alpha or 0xFF == 0xFF)
|
||||||
else
|
else
|
||||||
ratio = ratio or color.alpha
|
ratio = ratio or color.alpha or 0xFF
|
||||||
assert_uint8(ratio)
|
assert_uint8(ratio)
|
||||||
if color.alpha == ratio then
|
if color.alpha == ratio then
|
||||||
ratio = nil
|
ratio = nil
|
||||||
|
Loading…
Reference in New Issue
Block a user