diff --git a/aegisub/src/dialog_style_editor.cpp b/aegisub/src/dialog_style_editor.cpp index de70749ae..edd7b7062 100644 --- a/aegisub/src/dialog_style_editor.cpp +++ b/aegisub/src/dialog_style_editor.cpp @@ -364,7 +364,7 @@ void DialogStyleEditor::Apply(bool apply, bool close) { // Check if style name is unique for (unsigned int i=0;iGetStyle(styles[i]) != style) || c->ass->GetStyle(styles[i]) != style) { + if ((store && store->GetStyle(styles[i]) != style) || (!store && c->ass->GetStyle(styles[i]) != style)) { wxMessageBox("There is already a style with this name. Please choose another name.", "Style name conflict.", wxICON_ERROR|wxOK); return; }