fixed a crash when no subs selected

Originally committed to SVN as r941.
This commit is contained in:
pomyk 2007-02-25 18:08:19 +00:00
parent 3a1d4ee18e
commit 12c1e6f498
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ DialogStyleManager::DialogStyleManager (wxWindow *parent,SubtitlesGrid *_grid)
wxString selected_style; wxString selected_style;
if (_grid) { if (_grid) {
AssDialogue *dia = _grid->GetDialogue(_grid->GetFirstSelRow()); AssDialogue *dia = _grid->GetDialogue(_grid->GetFirstSelRow());
selected_style = dia->Style; if(dia) selected_style = dia->Style;
} }
if (StorageList->GetCount() && StorageList->SetStringSelection(selected_style)) { if (StorageList->GetCount() && StorageList->SetStringSelection(selected_style)) {