report("Allocation failure");
end:
+ view->ops->read(view, NULL);
end_update(view);
return FALSE;
}
{
struct line *line = &view->line[view->lines];
+ if (!data)
+ return TRUE;
+
line->data = strdup(data);
if (!line->data)
return FALSE;
static bool
tree_read(struct view *view, char *text)
{
- size_t textlen = strlen(text);
+ size_t textlen = text ? strlen(text) : 0;
char buf[SIZEOF_STR];
unsigned long pos;
enum line_type type;
{ '`', '.' },
{ '\'', ' ' },
{ '/', ' ' },
-
};
chtype symbol = get_rev_graph_symbol(graph);
struct rev_filler *filler;
main_read(struct view *view, char *line)
{
static struct rev_graph *graph = graph_stacks;
- enum line_type type = get_line_type(line);
+ enum line_type type;
struct commit *commit = view->lines
? view->line[view->lines - 1].data : NULL;
+ if (!line) {
+ return TRUE;
+ }
+
+ type = get_line_type(line);
+
switch (type) {
case LINE_COMMIT:
commit = calloc(1, sizeof(struct commit));