Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8109645 authored by Diego Perez's avatar Diego Perez
Browse files

Fix crash when shadowSize is 0

Change-Id: I9f131afc95a2571fbc8a737df37f43653cfbb90d
parent dd3fc6b9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -65,6 +65,9 @@ public class ShadowPainter {
    @SuppressWarnings({"SuspiciousNameCombination", "UnnecessaryLocalVariable"})  // Imported code
    public static BufferedImage createDropShadow(BufferedImage source, int shadowSize,
            float shadowOpacity, int shadowRgb) {
        if (shadowSize == 0) {
            return source;
        }

        // This code is based on
        //      http://www.jroller.com/gfx/entry/non_rectangular_shadow