mirror of https://github.com/xzeldon/htop.git
Fix crash when getCommandStr not overloaded for a platform process
Closes: #343
This commit is contained in:
parent
d62c2e9cca
commit
748f3eb7d8
|
@ -137,7 +137,7 @@ typedef struct ProcessClass_ {
|
||||||
|
|
||||||
#define As_Process(this_) ((const ProcessClass*)((this_)->super.klass))
|
#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) {
|
static inline pid_t Process_getParentPid(const Process* this) {
|
||||||
return this->tgid == this->pid ? this->ppid : this->tgid;
|
return this->tgid == this->pid ? this->ppid : this->tgid;
|
||||||
|
|
Loading…
Reference in New Issue