Added check if file is open before attempting to read tags

This commit is contained in:
gonemad
2012-10-11 21:20:03 -04:00
parent 1e660dda71
commit d15c8453ac
13 changed files with 54 additions and 27 deletions

View File

@ -86,14 +86,16 @@ WavPack::File::File(FileName file, bool readProperties,
Properties::ReadStyle propertiesStyle) : TagLib::File(file)
{
d = new FilePrivate;
read(readProperties, propertiesStyle);
if(isOpen())
read(readProperties, propertiesStyle);
}
WavPack::File::File(IOStream *stream, bool readProperties,
Properties::ReadStyle propertiesStyle) : TagLib::File(stream)
{
d = new FilePrivate;
read(readProperties, propertiesStyle);
if(isOpen())
read(readProperties, propertiesStyle);
}
WavPack::File::~File()