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

Commit 20e19b9d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Handle bitmap==null in PdfRenderer.Page#render."

parents e6979121 f126e21f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.graphics.Rect;
import android.os.ParcelFileDescriptor;
import android.system.ErrnoException;
import android.system.OsConstants;
import com.android.internal.util.Preconditions;
import dalvik.system.CloseGuard;
import libcore.io.Libcore;

@@ -375,6 +376,8 @@ public final class PdfRenderer implements AutoCloseable {
                           @Nullable Matrix transform, @RenderMode int renderMode) {
            throwIfClosed();

            destination = Preconditions.checkNotNull(destination, "bitmap null");

            if (destination.getConfig() != Config.ARGB_8888) {
                throw new IllegalArgumentException("Unsupported pixel format");
            }