diff options
| -rw-r--r-- | mg_image_provider.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mg_image_provider.c b/mg_image_provider.c index 1aeb9a6..cb60363 100644 --- a/mg_image_provider.c +++ b/mg_image_provider.c @@ -208,11 +208,14 @@ void mgImageProvider::Action() asprintf( &tmp, "image_convert.sh \"%s\" \"%s\"", filename.c_str(), tmpFile.c_str() ); system( (const char*) tmp ); free(tmp); - - // add to the list of converted images - Lock(); - m_converted_images.push_back( tmpFile ); - Unlock(); + + // if file can be read by process, add to the list of converted images + if( !access( tmpFile.c_str(), R_OK ) ) + { + Lock(); + m_converted_images.push_back( tmpFile ); + Unlock(); + } } // Check whether we need to continue this!? Next song may be playing already... |
