aboutsummaryrefslogtreecommitdiffhomepage
path: root/hyprctl
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-02-24 17:36:29 +0000
committerVaxry <[email protected]>2024-02-24 17:36:43 +0000
commit5824b0f305e95132184241832653d528b12c75e2 (patch)
tree7103c563ea7052beda691a371728480f4753dc16 /hyprctl
parente9528fc214bb3d807a4fcb6d35894f59760fba51 (diff)
downloadHyprland-5824b0f305e95132184241832653d528b12c75e2.tar.gz
Hyprland-5824b0f305e95132184241832653d528b12c75e2.zip
hyprctl: fix showing invalid instances
Diffstat (limited to 'hyprctl')
-rw-r--r--hyprctl/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp
index 9d3c98d1..ca08e436 100644
--- a/hyprctl/main.cpp
+++ b/hyprctl/main.cpp
@@ -89,7 +89,7 @@ std::vector<SInstanceData> instances() {
try {
data->time = std::stoull(data->id.substr(data->id.find_first_of('_') + 1));
- } catch (std::exception& e) { data->time = 0; }
+ } catch (std::exception& e) { continue; }
// read file
std::ifstream ifs(el.path().string());
@@ -99,7 +99,7 @@ std::vector<SInstanceData> instances() {
if (i == 0) {
try {
data->pid = std::stoull(line);
- } catch (std::exception& e) { data->pid = 0; }
+ } catch (std::exception& e) { continue; }
} else if (i == 1) {
data->wlSocket = line;
} else