diff --git a/src/main.c b/src/main.c index cf6c142..0d44dfa 100644 --- a/src/main.c +++ b/src/main.c @@ -153,12 +153,12 @@ void gallery_handler( struct gallery_info* gallery, hdf_set_value( cgi->hdf, "gallery.name", gallery->gallery_name ); hdf_set_value( cgi->hdf, "gallery.title", gallery->gallery_title ); hdf_set_value( cgi->hdf, "gallery.desc", gallery->gallery_desc ); - hdf_set_int_value( cgi->hdf, "photos", list->length ); + hdf_set_int_value( cgi->hdf, "photos", contents->photos->length ); size_t i; struct photo_info photo; for( i = 0; i < contents->photos->length; i++ ) { - if ( read_photo_info( gallery, contents->photos->string[i], + if ( read_photo_info( contents, contents->photos->string[i], &photo ) != NULL ) { snprintf( name, sizeof( name ),