Commit a3b8301d authored by Julius Künzel's avatar Julius Künzel
Browse files

[Renderer] Fix preset gets deleted if saving is canceled

parent a0827f2d
......@@ -312,7 +312,7 @@ RenderPresetDialog::RenderPresetDialog(QWidget *parent, RenderPresetModel *prese
speeds_list_str));
m_saveName = RenderPresetRepository::get()->savePreset(newPreset.get());
if ((mode == Mode::Edit) && (oldName != m_saveName)) {
if ((mode == Mode::Edit) && !m_saveName.isEmpty() && (oldName != m_saveName)) {
RenderPresetRepository::get()->deletePreset(oldName);
}
accept();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment