[Android] Add check for lister callback in removeDevice
Geoffrey Métais
git at videolan.org
Mon Jan 2 18:42:48 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 2 17:00:56 2017 +0100| [749e725c052ac9579fd22d40d2ca21ccf0c738a6] | committer: Geoffrey Métais
Add check for lister callback in removeDevice
> https://code.videolan.org/videolan/vlc-android/commit/749e725c052ac9579fd22d40d2ca21ccf0c738a6
---
medialibrary/jni/AndroidMediaLibrary.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/medialibrary/jni/AndroidMediaLibrary.cpp b/medialibrary/jni/AndroidMediaLibrary.cpp
index 81bc65f..862144c 100644
--- a/medialibrary/jni/AndroidMediaLibrary.cpp
+++ b/medialibrary/jni/AndroidMediaLibrary.cpp
@@ -79,7 +79,7 @@ bool
AndroidMediaLibrary::removeDevice(const std::string& uuid)
{
bool removed = p_lister->removeDevice(uuid);
- if (removed)
+ if (removed && p_DeviceListerCb != nullptr)
p_DeviceListerCb->onDeviceUnplugged(uuid);
return removed;
}
More information about the Android
mailing list