Fix crash when getCommandStr not overloaded for a platform process

Closes: #343
This commit is contained in:
Christian Göttsche 2020-11-26 15:21:01 +01:00
parent d62c2e9cca
commit 748f3eb7d8

View File

@ -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;