libgui: fix BQ buffer allocation error checking am: feec3b1a49
am: cc09fccf62

Change-Id: I5203cd613cb764a8d72d98532d43ec7826f79c57