Bug 870333 - Fixed a null pointer exception related to clipboard text (Having no text on the clipboard was causing exception). r=cpeterson

This commit is contained in:
Brian Ecker
2013-05-12 11:16:47 -07:00
parent 9bf1a98dd7
commit 4732fdf25d
3 changed files with 8 additions and 9 deletions

View File

@@ -2504,7 +2504,7 @@ abstract public class GeckoApp
switch(item.getItemId()) {
case R.id.pasteandgo: {
String text = GeckoAppShell.getClipboardText();
if (text != null && !TextUtils.isEmpty(text)) {
if (!TextUtils.isEmpty(text)) {
Tabs.getInstance().loadUrl(text);
}
return true;
@@ -2515,7 +2515,7 @@ abstract public class GeckoApp
}
case R.id.paste: {
String text = GeckoAppShell.getClipboardText();
if (text != null && !TextUtils.isEmpty(text)) {
if (!TextUtils.isEmpty(text)) {
showAwesomebar(AwesomeBar.Target.CURRENT_TAB, text);
}
return true;