From 748f3eb7d8610c4fb5cc93156d49675eba726f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Thu, 26 Nov 2020 15:21:01 +0100 Subject: Fix crash when getCommandStr not overloaded for a platform process Closes: #343 --- Process.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Process.h b/Process.h index ba3b83c9..774d337f 100644 --- a/Process.h +++ b/Process.h @@ -137,7 +137,7 @@ typedef struct ProcessClass_ { #define As_Process(this_) ((const ProcessClass*)((this_)->super.klass)) -#define Process_getCommand(this_) As_Process(this_)->getCommandStr((const Process*)(this_)) +#define Process_getCommand(this_) (As_Process(this_)->getCommandStr ? As_Process(this_)->getCommandStr((const Process*)(this_)) : ((const Process*)(this_))->comm) static inline pid_t Process_getParentPid(const Process* this) { return this->tgid == this->pid ? this->ppid : this->tgid; -- cgit v1.2.3