Index: src/checks.h |
diff --git a/src/checks.h b/src/checks.h |
index 3b0c85135475f3d028694ad5d962d004d88218c0..eeb748b4a80d875e16234a4a20b14575b33a7be9 100644 |
--- a/src/checks.h |
+++ b/src/checks.h |
@@ -125,7 +125,9 @@ static inline void CheckEqualsHelper(const char* file, |
const char* expected, |
const char* value_source, |
const char* value) { |
- if (strcmp(expected, value) != 0) { |
+ if ((expected == NULL && value != NULL) || |
+ (expected != NULL && value == NULL) || |
+ (expected != NULL && value != NULL && strcmp(expected, value) != 0)) { |
V8_Fatal(file, line, |
"CHECK_EQ(%s, %s) failed\n# Expected: %s\n# Found: %s", |
expected_source, value_source, expected, value); |