X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;ds=sidebyside;f=libchimara%2Fgraphics.c;h=a8a0318bd86ff19838c80a07a0849f284c851862;hb=f92585f76bce0b8d1efc11d2b2020a0f516234c5;hp=c87a148390aa0dc05fdd17a7114ac1ca6aa883e4;hpb=35034a7130db3e8e2f445de4cdf59bdca963a47c;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/graphics.c b/libchimara/graphics.c index c87a148..a8a0318 100644 --- a/libchimara/graphics.c +++ b/libchimara/graphics.c @@ -22,6 +22,10 @@ load_image_in_cache(glui32 image, gint width, gint height) guchar *buffer; /* Lookup the proper resource */ + if(!glk_data->resource_map) { + WARNING("No resource map has been loaded yet."); + return NULL; + } blorb_error = giblorb_load_resource(glk_data->resource_map, giblorb_method_FilePos, &resource, giblorb_ID_Pict, image); if(blorb_error != giblorb_err_None) { WARNING_S( "Error loading resource", giblorb_get_error_message(blorb_error) ); @@ -216,7 +220,7 @@ glk_image_get_info(glui32 image, glui32 *width, glui32 *height) if(width != NULL) *width = found->width; - if(width != NULL) + if(height != NULL) *height = found->height; return TRUE; }