add null check to onResult callback
PR to fix android crashing on result being null:
E FATAL EXCEPTION: main Process: com.poc_speech_recognigtion, PID: 11881 java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Iterator java.util.ArrayList.iterator()' on a null object reference at com.wenkesj.voice.VoiceModule.onResults(VoiceModule.java:354) at android.speech.SpeechRecognizer$InternalRecognitionListener$1.handleMessage(SpeechRecognizer.java:1062) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:230) at android.os.Looper.loop(Looper.java:319) at android.app.ActivityThread.main(ActivityThread.java:8893) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
+1
+1
+1
+1
Hi @lortmorris, these changes were approved last month, is there anything else needed for this to be merged?
+1
Has this bug been fixed? I still have this bug on version 3.2.4
"@react-native-voice/voice": "3.2.4", "react": "18.2.0", "react-native": "0.71.2"
Hi @Johan-dutoit, I see that the Project has been updated on Master branch, and this file on this PR doesn't even exist anymore. Can you please make sure this fix is done on the new code?