X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=blobdiff_plain;f=src%2Fiostreamtop.c;fp=src%2Fiostreamtop.c;h=7c1d611af8b74b1a7e6aa1ac566b2fbc5c8b52ad;hp=62b926ecb76de51934a864292153d19d582217d8;hb=6f29d91efdaccdce256eb2e35be385da599daa77;hpb=93d80d352e03c068f95da969b4bd8b503b7a1dac diff --git a/src/iostreamtop.c b/src/iostreamtop.c index 62b926e..7c1d611 100644 --- a/src/iostreamtop.c +++ b/src/iostreamtop.c @@ -199,13 +199,15 @@ int update_iostream_ret(struct lttngtop *ctx, int tid, char *comm, tmp->totalfileread += ret; tmp->fileread += ret; tmpfile = get_file(tmp, tmp->syscall_info->fd); - tmpfile->read += ret; + if (tmpfile) + tmpfile->read += ret; } else if (tmp->syscall_info->type == __NR_write && ret > 0) { tmp->totalfilewrite += ret; tmp->filewrite += ret; tmpfile = get_file(tmp, tmp->syscall_info->fd); - tmpfile->write += ret; + if (tmpfile) + tmpfile->write += ret; } else if (tmp->syscall_info->type == __NR_open && ret > 0) { tmpfile = tmp->files_history->file;