dont scale images to 0 px wide or tall
This commit is contained in:
parent
b338e27b32
commit
06202e2bad
1 changed files with 3 additions and 0 deletions
|
@ -139,6 +139,9 @@ void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba,
|
|||
dw = (gint)(dh * ((gdouble)sw / sh));
|
||||
}
|
||||
|
||||
if (!(dw && dh))
|
||||
return; /* XXX sanity check */
|
||||
|
||||
if (sw != dw || sh != dh) {
|
||||
/*if (!(rgba->cache && dw == rgba->cwidth && dh == rgba->cheight))*/ {
|
||||
g_free(rgba->cache);
|
||||
|
|
Loading…
Reference in a new issue