fixed crash when entering clone source password incorrectly
@@ -529,6 +529,22 @@ public class OptionColdFragment extends Fragment implements Selectable {
public void run() {
List<Address> addressList = PrivateKeyUtil.getECKeysFromBackupString(content, password);
+
+ if (addressList == null || addressList.size() == 0) {
+ getActivity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ if (dp != null && dp.isShowing()) {
+ dp.setThread(null);
+ dp.dismiss();
+ }
+ DropdownMessage.showDropdownMessage(getActivity(),
+ R.string.clone_from_failed_content_empty);
+ }
+ });
+ return;
+ }
+
HDMKeychain hdmKeychain = PrivateKeyUtil.getHDMKeychain(PrivateKeyUtil.getCloneContent(), password);
BitpieHDAccountCold bitpieHDAccountCold = null;
