From 88bd30b1e750138551a7b45786eaf6c28985f91d Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Thu, 2 Nov 2017 18:08:56 -0500
Subject: [PATCH] Low: pengine: avoid use-of-NULL
---
pengine/native.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pengine/native.c b/pengine/native.c
index d0cdcc4..5dc0420 100644
--- a/pengine/native.c
+++ b/pengine/native.c
@@ -2407,7 +2407,8 @@ LogActions(resource_t * rsc, pe_working_set_t * data_set, gboolean terminal)
next->details->uname);
} else if (start && is_set(start->flags, pe_action_runnable) == FALSE) {
- LogAction("Stop", rsc, current, NULL, stop, stop->reason?stop:start, terminal);
+ LogAction("Stop", rsc, current, NULL, stop,
+ (stop && stop->reason)? stop : start, terminal);
STOP_SANITY_ASSERT(__LINE__);
} else if (moving && current) {
--
1.8.3.1