hal: Fix NULL pointer dereference

Fix NULL pointer dereference in error case while querying
license from ACDB.

Change-Id: I8fab52d051655c6502adf3585d58cfcd365ec0cf
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index e7344a0..506d4a4 100755
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -3177,7 +3177,8 @@
     ALOGD("%s: License not found for %s", __func__, product_name);
 
 on_error:
-    *product_id = 0;
+    if (product_id)
+        *product_id = 0;
     return ret;
 }