aboutsummaryrefslogtreecommitdiff
path: root/src/partialator.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-05-03 10:55:02 +0200
committerThomas White <taw@physics.org>2022-05-03 10:57:05 +0200
commit9ddf2feeffd29bf6bff376413832cd35e5cb3594 (patch)
tree923db489665e42187a6241568f338c696d2dbfb4 /src/partialator.c
parent4948e7e3be38901bc5cd33580cfba2d259fa4a91 (diff)
partialator: Use default event ID in csplit for crystals which don't have one
Diffstat (limited to 'src/partialator.c')
-rw-r--r--src/partialator.c3
1 files changed, 3 insertions, 0 deletions
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 ) {