mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-23 22:55:58 +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() {
|
||||
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