summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-26 15:21:01 +0100
committerChristian Göttsche <cgzones@googlemail.com>2020-11-26 15:21:01 +0100
commit748f3eb7d8610c4fb5cc93156d49675eba726f77 (patch)
tree3b56abedef7f81bf9b34505f7e301fcb972320c0
parentd62c2e9cca4ebb7bd7d6eafa517a424ea03805b5 (diff)
Fix crash when getCommandStr not overloaded for a platform process
Closes: #343
-rw-r--r--Process.h2
1 files changed, 1 insertions, 1 deletions
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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy