[Android] Debug activity: prevent illegal access

Geoffrey Métais git at videolan.org
Fri Dec 20 16:30:38 CET 2019


vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Dec 20 16:29:18 2019 +0100| [a13d74d9f5d4471f6ada8075d025d5845ceef9ad] | committer: Geoffrey Métais

Debug activity: prevent illegal access

(cherry picked from commit 65542175446f124d86cb0e540323707541dd79c6)

> https://code.videolan.org/videolan/vlc-android/commit/a13d74d9f5d4471f6ada8075d025d5845ceef9ad
---

 vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt b/vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt
index fca5e86dd..80d9f894c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt
@@ -58,9 +58,9 @@ class DebugLogActivity : FragmentActivity(), DebugLogService.Client.Callback {
     }
 
     private val clearClickListener = View.OnClickListener {
-        client.clear()
+        if (::client.isInitialized) client.clear()
         logList.clear()
-        logAdapter.notifyDataSetChanged()
+        if (::logAdapter.isInitialized) logAdapter.notifyDataSetChanged()
         setOptionsButtonsEnabled(false)
     }
 



More information about the Android mailing list