From: <tr...@us...> - 2011-08-23 20:55:14
|
Revision: 14990 http://alleg.svn.sourceforge.net/alleg/?rev=14990&view=rev Author: trentg Date: 2011-08-23 20:55:08 +0000 (Tue, 23 Aug 2011) Log Message: ----------- Add some extra logging to PNG loader Modified Paths: -------------- allegro/branches/5.1/addons/image/png.c Modified: allegro/branches/5.1/addons/image/png.c =================================================================== --- allegro/branches/5.1/addons/image/png.c 2011-08-23 17:57:17 UTC (rev 14989) +++ allegro/branches/5.1/addons/image/png.c 2011-08-23 20:55:08 UTC (rev 14990) @@ -201,6 +201,7 @@ bmp = al_create_bitmap(width, height); if (!bmp) { + ALLEGRO_ERROR("al_create_bitmap failed while loading PNG.\n"); return NULL; } @@ -324,6 +325,7 @@ ASSERT(fp); if (!check_if_png(fp)) { + ALLEGRO_ERROR("Not a png.\n"); return NULL; } @@ -336,6 +338,7 @@ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, (void *)NULL, NULL, NULL); if (!png_ptr) { + ALLEGRO_ERROR("png_ptr == NULL\n"); return NULL; } @@ -343,6 +346,7 @@ info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_read_struct(&png_ptr, (png_infopp) NULL, (png_infopp) NULL); + ALLEGRO_ERROR("png_create_info_struct failed\n"); return NULL; } @@ -351,6 +355,7 @@ /* Free all of the memory associated with the png_ptr and info_ptr */ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL); /* If we get here, we had a problem reading the file */ + ALLEGRO_ERROR("Error reading PNG file\n"); return NULL; } png_set_error_fn(png_ptr, jmpbuf, user_error_fn, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |