A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[KERNEL] Check if surf_action_ is nullptr
[simgrid.git]
/
src
/
kernel
/
activity
/
ExecImpl.cpp
diff --git
a/src/kernel/activity/ExecImpl.cpp
b/src/kernel/activity/ExecImpl.cpp
index
17fdf8d
..
9cb7149
100644
(file)
--- a/
src/kernel/activity/ExecImpl.cpp
+++ b/
src/kernel/activity/ExecImpl.cpp
@@
-70,9
+70,9
@@
double simgrid::kernel::activity::ExecImpl::get_remaining_ratio()
{
if (host_ ==
nullptr) // parallel task: their remain is already between 0 and 1 (see comment in ExecImpl::get_remaining())
{
if (host_ ==
nullptr) // parallel task: their remain is already between 0 and 1 (see comment in ExecImpl::get_remaining())
- return surf_action_->get_remains();
+ return
(surf_action_ == nullptr) ? 0 :
surf_action_->get_remains();
else // Actually compute the ratio for sequential tasks
else // Actually compute the ratio for sequential tasks
- return surf_action_->get_remains() / surf_action_->get_cost();
+ return
(surf_action_ == nullptr) ? 0 :
surf_action_->get_remains() / surf_action_->get_cost();
}
void simgrid::kernel::activity::ExecImpl::set_bound(double bound)
}
void simgrid::kernel::activity::ExecImpl::set_bound(double bound)