|
@@ -55,7 +55,9 @@ public class RNViewShotModule extends ReactContextBaseJavaModule {
|
55
|
55
|
|
56
|
56
|
@ReactMethod
|
57
|
57
|
public void releaseCapture(String uri) {
|
58
|
|
- File file = new File(Uri.parse(uri).getPath());
|
|
58
|
+ final String path = Uri.parse(uri).getPath();
|
|
59
|
+ if (path == null) return;
|
|
60
|
+ File file = new File(path);
|
59
|
61
|
if (!file.exists()) return;
|
60
|
62
|
File parent = file.getParentFile();
|
61
|
63
|
if (parent.equals(reactContext.getExternalCacheDir()) || parent.equals(reactContext.getCacheDir())) {
|