瀏覽代碼

win32: better error reporting in the GDI+ loader, based on a patch by ponce.

legacy
Sam Hocevar sam 12 年之前
父節點
當前提交
6eb41c04ff
共有 1 個檔案被更改,包括 10 行新增0 行删除
  1. +10
    -0
      src/image/codec/gdiplus-image.cpp

+ 10
- 0
src/image/codec/gdiplus-image.cpp 查看文件

@@ -81,6 +81,16 @@ bool GdiPlusImageData::Open(char const *path)
return false;
}

if (bitmap->GetLastStatus() != Gdiplus::Ok)
{
#if !LOL_RELEASE
Log::Error("error %d loading %s\n",
(unsigned)bitmap->GetLastStatus(), path);
#endif
delete bitmap;
return false;
}

size = ivec2(bitmap->GetWidth(), bitmap->GetHeight());
format = Image::FORMAT_RGBA;



Loading…
取消
儲存