]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/DownloadActivity.java
go
[Dictionary.git] / src / com / hughes / android / dictionary / DownloadActivity.java
index a7834021c1bd6b098731568dfe11f56008bdbf93..96d68abea098344db4b99d92ee32a138d57478cc 100755 (executable)
@@ -79,6 +79,9 @@ public class DownloadActivity extends Activity {
           final URLConnection connection = uri.openConnection();\r
           contentLength = connection.getContentLength();\r
           final InputStream in = connection.getInputStream();\r
+          if (in == null) {\r
+            throw new IOException("Unable to open InputStream from source: " + source);\r
+          }\r
           final FileOutputStream out = new FileOutputStream(destTmpFile); \r
           int bytesRead = copyStream(in, out, R.string.downloading);\r
           \r