From 9ddf2feeffd29bf6bff376413832cd35e5cb3594 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 3 May 2022 10:55:02 +0200 Subject: partialator: Use default event ID in csplit for crystals which don't have one --- src/partialator.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/partialator.c') diff --git a/src/partialator.c b/src/partialator.c index 6521216d..39e8f8a3 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -279,6 +279,7 @@ static void write_custom_split(struct custom_split *csplit, int dsn, fn = crystal_get_image(crystals[i])->filename; evs = crystal_get_image(crystals[i])->ev; + if ( evs == NULL ) evs = "//"; id = malloc(strlen(evs)+strlen(fn)+2); if ( id == NULL ) { @@ -373,6 +374,7 @@ static signed int find_first_crystal(Crystal **crystals, int n_crystals, fn = crystal_get_image(crystals[i])->filename; evs = crystal_get_image(crystals[i])->ev; + if ( evs == NULL ) evs = "//"; id = malloc(strlen(evs)+strlen(fn)+2); if ( id == NULL ) { @@ -411,6 +413,7 @@ static void check_csplit(Crystal **crystals, int n_crystals, fn = crystal_get_image(crystals[i])->filename; evs = crystal_get_image(crystals[i])->ev; + if ( evs == NULL ) evs = "//"; id = malloc(strlen(evs)+strlen(fn)+2); if ( id == NULL ) { -- cgit v1.2.3