DirectoryAdapter: blind fix for a crash that never happens

This commit is contained in:
Edward Wang 2013-03-09 12:45:38 -05:00
parent cef94fc51a
commit 1250326701
2 changed files with 8 additions and 2 deletions

View File

@ -83,6 +83,9 @@ public class Util {
}
public static String PathToURI(String path) {
if(path == null) {
throw new NullPointerException("Cannot convert null path!");
}
return LibVLC.nativeToURI(path);
}

View File

@ -361,8 +361,11 @@ public class DirectoryAdapter extends BaseAdapter {
this.mCurrentDir = null;
this.mCurrentRoot = null;
}
} catch (URISyntaxException e) {
e.printStackTrace();
} catch(URISyntaxException e) {
Log.e(TAG, "URISyntaxException in browse()", e);
return false;
} catch(NullPointerException e) {
Log.e(TAG, "NullPointerException in browse()", e);
return false;
}
}