summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorgnat <[email protected]>2024-10-13 15:25:47 -0700
committergnat <[email protected]>2024-10-13 15:25:47 -0700
commit25528b00006745b4def7d2f61cc910592b4b3ae9 (patch)
treea82a469bc166596c18f62582745475b98e8abdf6 /lib
parent27e76f4fed37623b605070098ec956114cb73714 (diff)
check that conn is not null
Diffstat (limited to 'lib')
-rw-r--r--lib/hyprland/hyprland.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/hyprland/hyprland.vala b/lib/hyprland/hyprland.vala
index 3886486..8834ea2 100644
--- a/lib/hyprland/hyprland.vala
+++ b/lib/hyprland/hyprland.vala
@@ -158,8 +158,10 @@ public class Hyprland : Object {
out DataInputStream stream
) throws Error {
conn = connection("socket");
- conn.output_stream.write(message.data, null);
- stream = new DataInputStream(conn.input_stream);
+ if (conn != null) {
+ conn.output_stream.write(message.data, null);
+ stream = new DataInputStream(conn.input_stream);
+ }
}
public string message(string message) {