From 215696131b06a359e323a8cf5c70cee1d31fba4a Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sun, 26 Mar 2006 03:06:05 +0000 Subject: [PATCH] handle invalid style storage exception Originally committed to SVN as r247. --- core/ass_style_storage.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/ass_style_storage.cpp b/core/ass_style_storage.cpp index e719237ab..b840c9bcc 100644 --- a/core/ass_style_storage.cpp +++ b/core/ass_style_storage.cpp @@ -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 */ + } } }