Permalink
Browse files

Fix two nasty bugs:

1) Fix a crash if you visited the advanced capture interface, selected to edit a body but pushed the back button without saving
2) Fix a crash if there was a problem downloading a dropbox file
  • Loading branch information...
1 parent b80e735 commit 0189d2c659583c8e795e2377885e1c558180088d @matburt committed May 4, 2011
@@ -175,6 +175,9 @@ else if (this.actionMode.equals("create")) {
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == EDIT_BODY) {
+ if (data == null || data.getStringExtra("text") == null) {
+ return;
+ }
String newBody = data.getStringExtra("text");
mNode.nodePayload = newBody;
mBody.setText(newBody);
@@ -126,6 +126,10 @@ public BufferedReader fetchOrgFile(String orgPath) throws NotFoundException, Rep
null);
}
Log.i(LT, "Finished downloading");
+ if (fd.is == null) {
+ throw new ReportableError(r.getString(R.string.dropbox_fetch_error, orgPath, "Error downloading file"),
+ null);
+ }
BufferedReader reader = new BufferedReader(new InputStreamReader(fd.is));
return reader;
}

0 comments on commit 0189d2c

Please sign in to comment.