summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_tasking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/kmp_tasking.cpp')
-rw-r--r--openmp/runtime/src/kmp_tasking.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/openmp/runtime/src/kmp_tasking.cpp b/openmp/runtime/src/kmp_tasking.cpp
index 97baaf701ed..0eac1130d31 100644
--- a/openmp/runtime/src/kmp_tasking.cpp
+++ b/openmp/runtime/src/kmp_tasking.cpp
@@ -984,9 +984,10 @@ void __kmp_finish_implicit_task(kmp_info_t *thread) {
// thread: thread data structure corresponding to implicit task
void __kmp_free_implicit_task(kmp_info_t *thread) {
kmp_taskdata_t *task = thread->th.th_current_task;
- if (task->td_dephash)
+ if (task && task->td_dephash) {
__kmp_dephash_free(thread, task->td_dephash);
- task->td_dephash = NULL;
+ task->td_dephash = NULL;
+ }
}
// Round up a size to a power of two specified by val: Used to insert padding
OpenPOWER on IntegriCloud