Check if dbus handler is null before using

This commit is contained in:
William Wold
2022-02-07 18:18:44 -05:00
parent aad71116c5
commit 0b9350d19b

View File

@ -159,7 +159,9 @@ mod c {
}; };
if let Some(visible) = msg.dbus_visible_set { if let Some(visible) = msg.dbus_visible_set {
unsafe { dbus_handler_set_visible(dbus_handler, visible as u8) }; if dbus_handler != std::ptr::null() {
unsafe { dbus_handler_set_visible(dbus_handler, visible as u8) };
}
} }
if let Some(hints) = msg.layout_hint_set { if let Some(hints) = msg.layout_hint_set {