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:
Hisham Muhammad 2012-01-29 23:51:36 +00:00
parent 8b73d11ac6
commit ff8d54c221
1 changed files with 1 additions and 0 deletions

1
htop.c
View File

@ -772,6 +772,7 @@ int main(int argc, char** argv) {
break;
Affinity* affinity = Process_getAffinity((Process*) Panel_getSelected(panel));
if (!affinity) break;
Panel* affinityPanel = AffinityPanel_new(pl, affinity);
Affinity_delete(affinity);