better error handling

This commit is contained in:
Alexey Kuznetsov 2016-09-25 21:37:42 +03:00
commit da649cef66

View file

@ -814,7 +814,7 @@ public class RecordingActivity extends AppCompatActivity {
AlertDialog.Builder builder = new AlertDialog.Builder(RecordingActivity.this);
builder.setTitle("Error");
String msg = encoder.getException().getMessage();
if (msg.isEmpty()) {
if (msg == null || msg.isEmpty()) {
Throwable t = encoder.getException();
while (t.getCause() != null)
t = t.getCause();