Skip to content

Commit ea58938

Browse files
committed
fix exception when intent is null
1 parent 260601b commit ea58938

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/flutter_webview_plugin/WebviewManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public boolean handleResult(int requestCode, int resultCode, Intent intent){
4242
if(Build.VERSION.SDK_INT >= 21){
4343
if(requestCode == FILECHOOSER_RESULTCODE){
4444
Uri[] results = null;
45-
if(resultCode == Activity.RESULT_OK){
45+
if(resultCode == Activity.RESULT_OK && intent != null){
4646
String dataString = intent.getDataString();
4747
if(dataString != null){
4848
results = new Uri[]{ Uri.parse(dataString) };

0 commit comments

Comments
 (0)