瀏覽代碼

libpipi: sometimes imlib_load_image() succeeds but imlib_image_get_data()

returns NULL. Working around this properly.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2934 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 年之前
父節點
當前提交
497e7330e8
共有 1 個檔案被更改,包括 7 行新增0 行删除
  1. +7
    -0
      pipi/codec/imlib.c

+ 7
- 0
pipi/codec/imlib.c 查看文件

@@ -38,6 +38,13 @@ pipi_image_t *pipi_load_imlib2(const char *name)
return NULL;

imlib_context_set_image(priv);

if(!imlib_image_get_data())
{
imlib_free_image();
return NULL;
}

img = pipi_new(imlib_image_get_width(), imlib_image_get_height());

img->p[PIPI_PIXELS_RGBA_C].pixels = imlib_image_get_data();


Loading…
取消
儲存