From a0213cc93b849f149294ee5ce99c147d957626a7 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 27 Jan 2014 23:11:59 +0100 Subject: [PATCH 1/1] Always initialize p_power.event. --- src/surf/workstation_ptask_L07.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/surf/workstation_ptask_L07.cpp b/src/surf/workstation_ptask_L07.cpp index 1898fe7fc5..f44c1a1834 100644 --- a/src/surf/workstation_ptask_L07.cpp +++ b/src/surf/workstation_ptask_L07.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2010, 2013. The SimGrid Team. +/* Copyright (c) 2007-2010, 2013-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -436,7 +436,10 @@ CpuL07::CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t props, m_powerCurrent = power_initial; if (power_trace) - p_power.event = tmgr_history_add_trace(history, power_trace, 0.0, 0, static_cast(this)); + p_power.event = tmgr_history_add_trace(history, power_trace, 0.0, 0, + static_cast(this)); + else + p_power.event = NULL; setState(state_initial); if (state_trace) -- 2.20.1