diff --git a/src/metaflac/options.c b/src/metaflac/options.c index 1b4b6f624b..a78f7c57a4 100644 --- a/src/metaflac/options.c +++ b/src/metaflac/options.c @@ -251,8 +251,11 @@ FLAC__bool parse_options(int argc, char *argv[], CommandLineOptions *options) Operation *op = find_shorthand_operation(options, OP__IMPORT_CUESHEET_FROM); if(0 != op) { Operation *op2 = find_shorthand_operation(options, OP__ADD_SEEKPOINT); - if(0 == op2) + if(0 == op2) { op2 = append_shorthand_operation(options, OP__ADD_SEEKPOINT); + /* Need to re-find op, because the appending might have caused realloc */ + op = find_shorthand_operation(options, OP__IMPORT_CUESHEET_FROM); + } op->argument.import_cuesheet_from.add_seekpoint_link = &(op2->argument.add_seekpoint); } }