@@ 1,4 1,4 @@
-project('wofi', 'c', version : 'v1.4.1', default_options : ['c_std=c99', 'buildtype=release', 'warning_level=2'])
+project('wofi', 'c', version : 'hg', default_options : ['c_std=c99', 'buildtype=release', 'warning_level=2'])
cc = meson.get_compiler('c')
pkgcfg = import('pkgconfig')
@@ 926,7 926,16 @@ struct wl_list* wofi_read_cache(struct m
smallest_node = node;
}
}
- char* tmp = strdup(strchr(smallest_node->line, ' ') + 1);
+
+ char* space = strchr(smallest_node->line, ' ');
+
+ if(space == NULL) {
+ free(smallest_node->line);
+ wl_list_remove(&smallest_node->link);
+ continue;
+ }
+
+ char* tmp = strdup(space + 1);
free(smallest_node->line);
smallest_node->line = tmp;
wl_list_remove(&smallest_node->link);