diff options
-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) { |