We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2439117 commit 13920e5Copy full SHA for 13920e5
src/platform/Linux/bluez/BluezObjectManager.cpp
@@ -62,6 +62,11 @@ CHIP_ERROR BluezObjectManager::Init()
62
63
void BluezObjectManager::Shutdown()
64
{
65
+ // If the D-Bus connection or the object manager are not initialized,
66
+ // there is nothing to shutdown. This check prevents unnecessary call
67
+ // to the GLibMatterContextInvokeSync function.
68
+ VerifyOrReturn(mConnection || mObjectManager);
69
+
70
// Run endpoint cleanup on the CHIPoBluez thread. This is necessary because the
71
// cleanup function releases the D-Bus manager client object, which handles D-Bus
72
// signals. Otherwise, we will face race condition when the D-Bus signal is in
0 commit comments