polarssl: check us->notify_verify_error for NULL before calling it
[project/ustream-ssl.git] / ustream-polarssl.c
index ef8360abff64eac8d7242b8346b122acb83c0d98..e5c84557381dd5a1d56e14923bdef6c2b1dbb134 100644 (file)
@@ -200,7 +200,8 @@ static void ustream_ssl_verify_cert(struct ustream_ssl *us)
                msg = "unknown error";
 
        if (r) {
-               us->notify_verify_error(us, r, msg);
+               if (us->notify_verify_error)
+                       us->notify_verify_error(us, r, msg);
                return;
        }