android_media_MediaSync: Do not pass NULL to AString ctor.

Bug: 28643582
Change-Id: I75eaf61007adffdd7e3b07aebb37c12a8e71cf75
This commit is contained in:
Wei Jia
2016-05-16 17:40:02 -07:00
parent 8e30eb3a7f
commit 838a4ed101

View File

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