diff --git a/turbolinks/src/main/java/co/faria/turbolinks/TLChromeClientWithFileChooser.java b/turbolinks/src/main/java/co/faria/turbolinks/TLChromeClientWithFileChooser.java index b8d874e..dc20ffb 100644 --- a/turbolinks/src/main/java/co/faria/turbolinks/TLChromeClientWithFileChooser.java +++ b/turbolinks/src/main/java/co/faria/turbolinks/TLChromeClientWithFileChooser.java @@ -387,8 +387,10 @@ public void execFileCallback(Uri[] resValue) { @Override public void run() { try { - Uri[] resValue = copyFileToCachedDir(finalResValue); - filePathCallback.onReceiveValue(resValue); + if (filePathCallback != null) { + Uri[] resValue = copyFileToCachedDir(finalResValue); + filePathCallback.onReceiveValue(resValue); + } } catch (IOException e) { e.printStackTrace(); }