mirror of https://github.com/odrling/Aegisub
fixed a crash when no subs selected
Originally committed to SVN as r941.
This commit is contained in:
parent
3a1d4ee18e
commit
12c1e6f498
|
@ -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)) {
|
||||||
|
|
Loading…
Reference in New Issue