Skip to content

Commit 32b2b03

Browse files
authored
Update permission_handler_windows_plugin.cpp
Fixed Baseflow#1388
1 parent 416e7b0 commit 32b2b03

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

permission_handler_windows/windows/permission_handler_windows_plugin.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ void PermissionHandlerWindowsPlugin::RegisterWithRegistrar(
8787
}
8888

8989
PermissionHandlerWindowsPlugin::PermissionHandlerWindowsPlugin(){
90-
m_positionChangedRevoker = geolocator.PositionChanged(winrt::auto_revoke,
91-
[this](Geolocator const& geolocator, PositionChangedEventArgs e)
92-
{
93-
});
90+
try {
91+
m_positionChangedRevoker = geolocator.PositionChanged(winrt::auto_revoke,
92+
[this](Geolocator const& geolocator, PositionChangedEventArgs e)
93+
{
94+
});
95+
} catch (...) {
96+
/* Do nothing */
97+
}
9498
}
9599

96100
PermissionHandlerWindowsPlugin::~PermissionHandlerWindowsPlugin() = default;

0 commit comments

Comments
 (0)