handle invalid style storage exception

Originally committed to SVN as r247.
This commit is contained in:
David Lamparter 2006-03-26 03:06:05 +00:00
parent 68cf63296f
commit 215696131b
1 changed files with 6 additions and 2 deletions

View File

@ -91,8 +91,12 @@ void AssStyleStorage::Load(wxString name) {
wxString data(buffer,wxConvUTF8);
data.Trim();
if (data.substr(0,6) == _T("Style:")) {
curStyle = new AssStyle(data);
style.push_back(curStyle);
try {
curStyle = new AssStyle(data);
style.push_back(curStyle);
} catch(...) {
/* just ignore invalid lines for now */
}
}
}