diff --git a/core/dialog_style_manager.cpp b/core/dialog_style_manager.cpp index 0db336412..9c1cc8be5 100644 --- a/core/dialog_style_manager.cpp +++ b/core/dialog_style_manager.cpp @@ -138,13 +138,13 @@ DialogStyleManager::DialogStyleManager (wxWindow *parent,SubtitlesGrid *_grid) selected_style = dia->Style; } - if (StorageList->SetStringSelection(selected_style)) { + if (StorageList->GetCount() && StorageList->SetStringSelection(selected_style)) { StorageEdit->Enable(); StorageCopy->Enable(); StorageDelete->Enable(); MoveToLocal->Enable(); } - if (CurrentList->SetStringSelection(selected_style)) { + if (CurrentList->GetCount() && CurrentList->SetStringSelection(selected_style)) { CurrentEdit->Enable(); CurrentCopy->Enable(); CurrentDelete->Enable();