From 2d9ea44d1207af44ed869d32958503c68a69e40a Mon Sep 17 00:00:00 2001 From: Kyzentun Date: Mon, 27 Apr 2015 07:48:50 -0600 Subject: [PATCH] Song::TidyUpData now clears graphics fields that point to files that don't exist. --- src/Song.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Song.cpp b/src/Song.cpp index 219d713c02..65387504bd 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -996,6 +996,16 @@ void Song::TidyUpData( bool from_cache, bool /* duringCache */ ) // (except for edits). We should be able to use difficulty names as // unique identifiers for steps. */ SongUtil::AdjustDuplicateSteps(this); + + // Clear fields for files that turned out to not exist. +#define CLEAR_NOT_HAS(has_name, field_name) if(!has_name) { field_name= ""; } + CLEAR_NOT_HAS(m_bHasBanner, m_sBannerFile); + CLEAR_NOT_HAS(m_bHasBackground, m_sBackgroundFile); + CLEAR_NOT_HAS(has_jacket, m_sJacketFile); + CLEAR_NOT_HAS(has_cdimage, m_sCDFile); + CLEAR_NOT_HAS(has_disc, m_sDiscFile); + CLEAR_NOT_HAS(has_cdtitle, m_sCDTitleFile); +#undef CLEAR_NOT_HAS } /* Generate these before we autogen notes, so the new notes can inherit