mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
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 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;
|
||||
|
Loading…
Reference in New Issue
Block a user