diff options
author | Nathan Scott <natoscott@users.noreply.github.com> | 2021-08-17 15:42:33 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 15:42:33 +1000 |
commit | 3f727d4720c8df38789dea246a5217a5412ebbcf (patch) | |
tree | 0b7093afd5d7846f86b1e317c0022130ca66e42e /Action.c | |
parent | fefff80631e86f0296a2621a3699b16de60b86c6 (diff) | |
parent | d5ff5c48a889c1eab6e3792d3f5ca1566cf05491 (diff) |
Merge pull request #747 from natoscott/coverity
Coverity scan updates (minor)
Diffstat (limited to 'Action.c')
-rw-r--r-- | Action.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -174,8 +174,9 @@ static Htop_Reaction actionSetSortColumn(State* st) { char* name = NULL; if (fields[i] >= LAST_PROCESSFIELD) { DynamicColumn* column = Hashtable_get(dynamicColumns, fields[i]); - if (column) - name = xStrdup(column->caption ? column->caption : column->name); + if (!column) + continue; + name = xStrdup(column->caption ? column->caption : column->name); } else { name = String_trim(Process_fields[fields[i]].name); } |