Avoid trying to remove tag chunks when an AIFF file doesn't have an ID3v2 tag.

This commit is contained in:
Tsuda Kageyu 2015-11-30 14:17:26 +09:00
parent fcdf7c2ae2
commit f9e558eef5

View File

@ -115,9 +115,11 @@ bool RIFF::AIFF::File::save()
return false;
}
removeChunk("ID3 ");
removeChunk("id3 ");
d->hasID3v2 = false;
if(d->hasID3v2) {
removeChunk("ID3 ");
removeChunk("id3 ");
d->hasID3v2 = false;
}
if(tag() && !tag()->isEmpty()) {
setChunkData("ID3 ", d->tag->render());