Fix to handle missing checks on error returned am: bcbd383251 am: f98b3e9ee5

Original change: https://android-review.googlesource.com/c/platform/external/libxaac/+/1425108

Change-Id: Ic4aa96be38c5f425ff7145121e61f79f775cbff8