Ensure checkout_skia is defined before use
Checks that checkout_skia is defined before dereferencing in PDFium's
top-level BUILD.gn. When used in non-PDFium projects (like Chromium),
build/config/gclient_args.gni likely doesn't define checkout_skia.
Bug: pdfium:1938
Change-Id: I2d8fb5affe79c1a13075463e908900031a3a9960
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/101210
Auto-Submit: K. Moon <kmoon@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nigi <nigi@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 070df30..7339b2a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -582,7 +582,7 @@
# TODO(crbug.com/pdfium/1832): Remove !is_android when //third_party/expat is
# available.
- if (checkout_skia && !is_android) {
+ if (defined(checkout_skia) && checkout_skia && !is_android) {
deps += [ "//skia" ]
}
}