From: Arnaud Giersch Date: Mon, 27 Jan 2014 22:11:59 +0000 (+0100) Subject: Always initialize p_power.event. X-Git-Tag: v3_11_beta~120^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a0213cc93b849f149294ee5ce99c147d957626a7?ds=sidebyside Always initialize p_power.event. --- 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)