diff options
Diffstat (limited to 'plugins/converter/converter.c')
-rw-r--r-- | plugins/converter/converter.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/converter/converter.c b/plugins/converter/converter.c index 39604785..84d73748 100644 --- a/plugins/converter/converter.c +++ b/plugins/converter/converter.c @@ -149,6 +149,10 @@ encoder_preset_load (const char *fname) { // @return -1 on path/write error, -2 if file already exists int encoder_preset_save (ddb_encoder_preset_t *p, int overwrite) { + if (!p->title || !p->title[0]) { + fprintf (stderr, "encoder_preset_save: empty title\n"); + return -1; + } const char *confdir = deadbeef->get_config_dir (); char path[1024]; if (snprintf (path, sizeof (path), "%s/presets", confdir) < 0) { @@ -349,6 +353,10 @@ dsp_preset_load (const char *fname) { int dsp_preset_save (ddb_dsp_preset_t *p, int overwrite) { + if (!p->title || !p->title[0]) { + fprintf (stderr, "dsp_preset_save: empty title\n"); + return -1; + } const char *confdir = deadbeef->get_config_dir (); char path[1024]; if (snprintf (path, sizeof (path), "%s/presets", confdir) < 0) { |