mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-12-26 03:19:48 +01:00
handle dbus errors in connect
This commit is contained in:
parent
2aed59f8bc
commit
0fb5448745
1 changed files with 6 additions and 1 deletions
|
@ -237,7 +237,12 @@ void CPortalManager::onGlobalRemoved(void* data, struct wl_registry* registry, u
|
|||
}
|
||||
|
||||
void CPortalManager::init() {
|
||||
m_pConnection = sdbus::createDefaultBusConnection("org.freedesktop.impl.portal.desktop.hyprland");
|
||||
try {
|
||||
m_pConnection = sdbus::createDefaultBusConnection("org.freedesktop.impl.portal.desktop.hyprland");
|
||||
} catch (std::exception& e) {
|
||||
Debug::log(CRIT, "Couldn't create the dbus connection ({})", e.what());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!m_pConnection) {
|
||||
Debug::log(CRIT, "Couldn't connect to dbus");
|
||||
|
|
Loading…
Reference in a new issue