diff --git a/aegisub/src/dialog_style_manager.cpp b/aegisub/src/dialog_style_manager.cpp index 51f600fa8..91b5ac42c 100644 --- a/aegisub/src/dialog_style_manager.cpp +++ b/aegisub/src/dialog_style_manager.cpp @@ -618,6 +618,7 @@ void DialogStyleManager::OnCopyToCurrent (wxCommandEvent &event) { void DialogStyleManager::OnStorageCopy (wxCommandEvent &event) { wxArrayInt selections; StorageList->GetSelections(selections); + if (selections.size() == 0) return; AssStyle *temp = new AssStyle(*(styleStorageMap.at(selections[0]))); wxString newName = _("Copy of "); @@ -642,6 +643,7 @@ void DialogStyleManager::OnStorageCopy (wxCommandEvent &event) { void DialogStyleManager::OnCurrentCopy (wxCommandEvent &event) { wxArrayInt selections; CurrentList->GetSelections(selections); + if (selections.size() == 0) return; AssStyle *temp = new AssStyle(styleMap.at(selections[0])->GetEntryData()); wxString newName = _("Copy of ");