mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-26 04:25:00 +03:00
Catched exception while getting active desktop name
This commit is contained in:
parent
5833b434ef
commit
e71e7e1cd3
@ -176,7 +176,7 @@ String
|
||||
MSWindowsSession::getActiveDesktopName()
|
||||
{
|
||||
String result;
|
||||
|
||||
try {
|
||||
HDESK hd = OpenInputDesktop(0, TRUE, GENERIC_READ);
|
||||
if (hd != NULL) {
|
||||
DWORD size;
|
||||
@ -186,6 +186,10 @@ MSWindowsSession::getActiveDesktopName()
|
||||
result = name;
|
||||
CloseDesktop(hd);
|
||||
}
|
||||
}
|
||||
catch (std::exception error) {
|
||||
LOG((CLOG_ERR "failed to get active desktop name: %s", error.what()));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user