mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ss: check destroy null policy
This commit is contained in:
parent
7135b3113b
commit
5ea9194378
1 changed files with 3 additions and 3 deletions
|
@ -1311,7 +1311,7 @@ lws_ss_destroy(lws_ss_handle_t **ppss)
|
|||
*/
|
||||
|
||||
#if defined(LWS_WITH_SERVER)
|
||||
if (h->policy->flags & LWSSSPOLF_SERVER)
|
||||
if (h->policy && (h->policy->flags & LWSSSPOLF_SERVER))
|
||||
v = lws_get_vhost_by_name(h->context, h->policy->streamtype);
|
||||
#endif
|
||||
|
||||
|
@ -1363,8 +1363,8 @@ lws_ss_destroy(lws_ss_handle_t **ppss)
|
|||
* to the ss connect code instead.
|
||||
*/
|
||||
|
||||
|
||||
lws_ss_policy_unref_trust_store(h->context, h->policy);
|
||||
if (h->policy)
|
||||
lws_ss_policy_unref_trust_store(h->context, h->policy);
|
||||
#endif
|
||||
|
||||
#if defined(LWS_WITH_SERVER)
|
||||
|
|
Loading…
Add table
Reference in a new issue