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

Commit 76e53b5b authored by Diego Perez's avatar Diego Perez
Browse files

Handle the case where there is no clip defined

Currently this generates a NPE.

Bug: http://b.android.com/221956
Change-Id: I54e758ea001c3ed41d3d01a09d9ed66be45233cc
parent 00431f70
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -620,7 +620,8 @@ public class GcSnapshot {
            int y = 0;
            int width;
            int height;
            Rectangle clipBounds = originalGraphics.getClipBounds();
            Rectangle clipBounds = originalGraphics.getClip() != null ? originalGraphics
                    .getClipBounds() : null;
            if (clipBounds != null) {
                if (clipBounds.width == 0 || clipBounds.height == 0) {
                    // Clip is 0 so no need to paint anything.