AAPT2: Fix segfault when showing error in 9-patch
Change-Id: I8f457212efc27480758a7157455d98b5e316f772
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";