Index: tools/get_images_from_skps.cpp |
diff --git a/tools/get_images_from_skps.cpp b/tools/get_images_from_skps.cpp |
index f963b9a86b59bd08d8d6a04afe27e2de824df30f..a78c412a1bf35f07742cde2de9d43c9aa1145679 100644 |
--- a/tools/get_images_from_skps.cpp |
+++ b/tools/get_images_from_skps.cpp |
@@ -157,12 +157,14 @@ int main(int argc, char** argv) { |
SkDebugf("%d known, %d unknown\n", gKnown, totalUnknowns); |
fRoot["totalFailures"] = totalUnknowns; |
fRoot["totalSuccesses"] = gKnown; |
- if (totalUnknowns > 0 && !FLAGS_failuresJsonPath.isEmpty()) { |
- SkDebugf("Writing failures to %s\n", FLAGS_failuresJsonPath[0]); |
- SkFILEWStream stream(FLAGS_failuresJsonPath[0]); |
- stream.writeText(Json::StyledWriter().write(fRoot).c_str()); |
- stream.flush(); |
+ if (totalUnknowns > 0) { |
+ if (!FLAGS_failuresJsonPath.isEmpty()) { |
+ SkDebugf("Writing failures to %s\n", FLAGS_failuresJsonPath[0]); |
+ SkFILEWStream stream(FLAGS_failuresJsonPath[0]); |
+ stream.writeText(Json::StyledWriter().write(fRoot).c_str()); |
+ stream.flush(); |
+ } |
+ return -1; |
} |
- |
return 0; |
} |