Zero message may be passed causing null pointer de-reference. Adding check on the number of messages passed to handle the issue. Change-Id: I7cef6dd2070c5eaaa748698c45540f8aa1d96116 Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>