diff options
author | gnat <[email protected]> | 2024-10-13 15:25:47 -0700 |
---|---|---|
committer | gnat <[email protected]> | 2024-10-13 15:25:47 -0700 |
commit | 25528b00006745b4def7d2f61cc910592b4b3ae9 (patch) | |
tree | a82a469bc166596c18f62582745475b98e8abdf6 /lib | |
parent | 27e76f4fed37623b605070098ec956114cb73714 (diff) |
check that conn is not null
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hyprland/hyprland.vala | 6 |
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) { |