aboutsummaryrefslogtreecommitdiff
path: root/src/crystfel_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crystfel_gui.c')
-rw-r--r--src/crystfel_gui.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index 87f57e7c..77a064f3 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -138,19 +138,21 @@ static void add_all_events(struct crystfelproject *proj,
const char *filename,
const DataTemplate *dtempl)
{
- struct event_list *events;
+ char **events;
int i;
+ int n_events;
- events = image_expand_frames(dtempl, filename);
+ events = image_expand_frames(dtempl, filename, &n_events);
if ( events == NULL ) {
ERROR("Couldn't expand event list\n");
return;
}
- for ( i=0; i<events->num_events; i++ ) {
- add_file_to_project(proj, filename,
- get_event_string(events->events[i]));
+ for ( i=0; i<n_events; i++ ) {
+ add_file_to_project(proj, filename, events[i]);
+ free(events[i]);
}
+ free(events);
}