mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-27 22:01:29 +02:00
avoid details crash
This commit is contained in:
parent
9c9da4606b
commit
7e5a808c73
@ -1313,7 +1313,7 @@ namespace Proc {
|
||||
if (item_fit >= 7) out += cjust(to_string(detailed.entry.threads), item_width);
|
||||
if (item_fit >= 8) out += cjust(to_string(detailed.entry.p_nice), item_width);
|
||||
|
||||
|
||||
if (detailed.mem_bytes.size() > 0) {
|
||||
const double mem_p = (double)detailed.mem_bytes.back() * 100 / totalMem;
|
||||
string mem_str = to_string(mem_p);
|
||||
mem_str.resize((mem_p < 10 or mem_p >= 100 ? 3 : 4));
|
||||
@ -1322,6 +1322,7 @@ namespace Proc {
|
||||
+ Theme::c("proc_misc") + detailed_mem_graph(detailed.mem_bytes, (redraw or data_same or not alive)) + ' '
|
||||
+ Theme::c("title") + Fx::b + detailed.memory;
|
||||
}
|
||||
}
|
||||
|
||||
//? Check bounds of current selection and view
|
||||
if (start > 0 and numpids <= select_max)
|
||||
|
Loading…
Reference in New Issue
Block a user