Browse Source

debug/traces: add missing check if trace.rec file is NULL

Samuel Pitoiset 9 years ago
parent
commit
553bb2751d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/debug/traces/starpu_fxt.c

+ 2 - 1
src/debug/traces/starpu_fxt.c

@@ -1042,7 +1042,8 @@ static void handle_start_codelet_body(struct fxt_ev_64 *ev, struct starpu_fxt_op
 		unsigned sched_ctx = ev->param[1];
 
 		worker_set_state(start_codelet_time, prefix, ev->param[2], name);
-		recfmt_worker_set_state(start_codelet_time, ev->param[2], name, "Task");
+		if (trace_file)
+			recfmt_worker_set_state(start_codelet_time, ev->param[2], name, "Task");
 		if (sched_ctx != 0)
 		{
 #ifdef STARPU_HAVE_POTI