summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2005-08-31 00:21:14 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2005-08-31 00:21:14 +0000
commitb047964889cac1ff2679aecd0854e59ee8e2268b (patch)
tree4349d4b06b3239773fb6c1abf11f790a7fcecd6f /src
parent585e45d668dfd4b75759bee6dd52b4a8ab188451 (diff)
downloadflac-b047964889cac1ff2679aecd0854e59ee8e2268b.tar.gz
fix minor problem with error case in handler for --add-seekpoint
Diffstat (limited to 'src')
-rw-r--r--src/metaflac/options.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/metaflac/options.c b/src/metaflac/options.c
index a9c5576e..dd6f3878 100644
--- a/src/metaflac/options.c
+++ b/src/metaflac/options.c
@@ -556,12 +556,14 @@ FLAC__bool parse_option(int option_index, const char *option_argument, CommandLi
fprintf(stderr, "ERROR (--%s): malformed seekpoint specification \"%s\",\n %s\n", opt, option_argument, violation);
ok = false;
}
- op = find_shorthand_operation(options, OP__ADD_SEEKPOINT);
- if(0 == op)
- op = append_shorthand_operation(options, OP__ADD_SEEKPOINT);
- local_strcat(&(op->argument.add_seekpoint.specification), spec);
- local_strcat(&(op->argument.add_seekpoint.specification), ";");
- free(spec);
+ else {
+ op = find_shorthand_operation(options, OP__ADD_SEEKPOINT);
+ if(0 == op)
+ op = append_shorthand_operation(options, OP__ADD_SEEKPOINT);
+ local_strcat(&(op->argument.add_seekpoint.specification), spec);
+ local_strcat(&(op->argument.add_seekpoint.specification), ";");
+ free(spec);
+ }
}
else if(0 == strcmp(opt, "add-replay-gain")) {
(void) append_shorthand_operation(options, OP__ADD_REPLAY_GAIN);