fix #398 (crash on opening style editor)

Originally committed to SVN as r1379.
This commit is contained in:
David Lamparter 2007-07-05 19:03:26 +00:00
parent 890254c7ab
commit 4126b0e5bc

View file

@ -155,7 +155,7 @@ void SubtitlesPreview::UpdateBitmap(int w,int h) {
subs->LoadDefault();
int ver = 1;
wxString outGroup;
subs->InsertStyle(style);
subs->InsertStyle((AssStyle *)style->Clone());
subs->SetScriptInfo(_T("PlayResX"),wxString::Format(_T("%i"),w));
subs->SetScriptInfo(_T("PlayResY"),wxString::Format(_T("%i"),h));
subs->AddLine(_T("Dialogue: 0,0:00:00.00,0:00:05.00,Preview,,0000,0000,0000,,{\\q2}") + showText,_T("[Events]"),0,ver,&outGroup);