Merge "Fix EffectsRecorder error path handling when ending recording." into ics-mr1
diff --git a/src/com/android/camera/EffectsRecorder.java b/src/com/android/camera/EffectsRecorder.java
index 390efa6..3d2aebf 100644
--- a/src/com/android/camera/EffectsRecorder.java
+++ b/src/com/android/camera/EffectsRecorder.java
@@ -798,7 +798,13 @@
if (result == GraphRunner.RESULT_ERROR) {
// Handle error case
Log.e(TAG, "Error running filter graph!");
- raiseError(mRunner == null ? null : mRunner.getError());
+ Exception e = null;
+ if (mRunner != null) {
+ e = mRunner.getError();
+ } else if (mOldRunner != null) {
+ e = mOldRunner.getError();
+ }
+ raiseError(e);
}
if (mOldRunner != null) {
// Tear down old graph if available