Commits

Tobias Duehr committed d5bc98c

Fixed crash on empty repos

Comments (0)

Files changed (1)

src/com/saibotd/bitbeaker/RepositoryActivity.java

     }
     
     private void listBranches() {
-		new AsyncBranchesLoader().execute("https://api.bitbucket.org/1.0/repositories/" + owner + "/" + slug + "/branches");
+		new AsyncBranchesLoader().execute("https://api.bitbucket.org/1.0/repositories/" + owner + "/" + slug + "/branches", null, "No branches found.");
 	}
     
     protected class AsyncBranchesLoader extends AsyncLoader {
 				for (int i=0; i<names.length(); i++)
 					branches[i] = names.getString(i);
 				invalidateOptionsMenu();
-			} catch (JSONException e) {
+			} catch (Exception e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}