mirror of https://github.com/xzeldon/htop.git
Extra check if Process_getAffinity fails.
I could not reproduce the crash in current SVN (I've been adding checks for problems like this), but the sanity check looks correct. Thanks to Cybjit. Closes #3481053.
This commit is contained in:
parent
8b73d11ac6
commit
ff8d54c221
1
htop.c
1
htop.c
|
@ -772,6 +772,7 @@ int main(int argc, char** argv) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Affinity* affinity = Process_getAffinity((Process*) Panel_getSelected(panel));
|
Affinity* affinity = Process_getAffinity((Process*) Panel_getSelected(panel));
|
||||||
|
if (!affinity) break;
|
||||||
Panel* affinityPanel = AffinityPanel_new(pl, affinity);
|
Panel* affinityPanel = AffinityPanel_new(pl, affinity);
|
||||||
Affinity_delete(affinity);
|
Affinity_delete(affinity);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue