Merge "android_media_MediaSync: Do not pass NULL to AString ctor." into nyc-dev

This commit is contained in:
Wei Jia
2016-05-17 21:17:36 +00:00
committed by Android (Google) Code Review

View File

@@ -159,7 +159,7 @@ static void throwExceptionAsNecessary(
if (err > 0) { if (err > 0) {
break; break;
} }
AString msgWithErrorCode(msg); AString msgWithErrorCode(msg == NULL ? "" : msg);
msgWithErrorCode.append(" error:"); msgWithErrorCode.append(" error:");
msgWithErrorCode.append(err); msgWithErrorCode.append(err);
jniThrowException(env, "java/lang/IllegalStateException", msgWithErrorCode.c_str()); jniThrowException(env, "java/lang/IllegalStateException", msgWithErrorCode.c_str());