Index: src/ports/SkOSFile_stdio.cpp |
diff --git a/src/ports/SkOSFile_stdio.cpp b/src/ports/SkOSFile_stdio.cpp |
index 5b497d417a93683d3fadc8a48f49d871edffd862..b7268a3f5b35975d1aba3c7857b1ee83a37622e2 100644 |
--- a/src/ports/SkOSFile_stdio.cpp |
+++ b/src/ports/SkOSFile_stdio.cpp |
@@ -32,7 +32,12 @@ SkFILE* sk_fopen(const char path[], SkFILE_Flags flags) { |
//TODO: on Windows fopen is just ASCII or the current code page, |
//convert to utf16 and use _wfopen |
- return (SkFILE*)::fopen(path, perm); |
+ SkFILE* file = (SkFILE*)::fopen(path, perm); |
+ if (nullptr == file) { |
+ SkDEBUGF(("sk_fopen: fopen(%s, %s) returned NULL errno:%d :%s\n", |
+ path, perm, errno, strerror(errno))); |
djsollen
2015/09/02 18:44:06
fix spacing but otherwise lgtm
bungeman-skia
2015/09/02 19:35:54
Done.
|
+ } |
+ return file; |
} |
char* sk_fgets(char* str, int size, SkFILE* f) { |