Merge "AAPT2: Fix segfault when showing error in 9-patch" into nyc-dev
diff --git a/tools/aapt2/compile/Png.cpp b/tools/aapt2/compile/Png.cpp
index 9837c4e..bbf7f41 100644
--- a/tools/aapt2/compile/Png.cpp
+++ b/tools/aapt2/compile/Png.cpp
@@ -1175,7 +1175,7 @@
if (errorMsg) {
std::stringstream err;
err << "9-patch malformed: " << errorMsg;
- if (!errorEdge) {
+ if (errorEdge) {
err << "." << std::endl;
if (errorPixel >= 0) {
err << "Found at pixel #" << errorPixel << " along " << errorEdge << " edge";