зеркало из https://github.com/mozilla/moz-skia.git
check if the encoder factory returned null
git-svn-id: http://skia.googlecode.com/svn/trunk@255 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
6189877c50
Коммит
9dc5465c1c
|
@ -128,7 +128,8 @@ public:
|
|||
remove(path.c_str());
|
||||
|
||||
SkImageEncoder* codec = SkImageEncoder::Create(gTypes[j]);
|
||||
if (!codec->encodeFile(path.c_str(), fBitmaps[i], 100)) {
|
||||
if (NULL == codec ||
|
||||
!codec->encodeFile(path.c_str(), fBitmaps[i], 100)) {
|
||||
SkDebugf("------ failed to encode %s\n", path.c_str());
|
||||
remove(path.c_str()); // remove any partial file
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче