Skip to content

Commit a6366cd

Browse files
author
Patrik Fiedler
committed
fix a nullptr bug
1 parent 23c924a commit a6366cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Release/include/cpprest/http_client.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ class http_client_config
326326
/// <param name="callback">A user callback allowing for customization of the session</param>
327327
void set_nativesessionhandle_options(const std::function<void(native_handle)> &callback)
328328
{
329-
m_set_user_nativesessionhandle_options = callback;
329+
m_set_user_nativesessionhandle_options = callback;
330330
}
331331

332332
/// <summary>
@@ -335,7 +335,9 @@ class http_client_config
335335
/// <param name="handle">A internal implementation handle.</param>
336336
void invoke_nativesessionhandle_options(native_handle handle) const
337337
{
338+
if (m_set_user_nativesessionhandle_options != nullptr) {
338339
m_set_user_nativesessionhandle_options(handle);
340+
}
339341
}
340342

341343

0 commit comments

Comments
 (0)