mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
Take a ref when creating a bctbx_list of C pointers from a std::list of shared_ptr
This commit is contained in:
parent
7969616d43
commit
18f0782b46
1 changed files with 4 additions and 3 deletions
|
|
@ -367,8 +367,9 @@ public:
|
|||
>
|
||||
static inline bctbx_list_t *getResolvedCListFromCppList (const std::list<std::shared_ptr<CppType>> &cppList) {
|
||||
bctbx_list_t *result = nullptr;
|
||||
for (const auto &value : cppList)
|
||||
result = bctbx_list_append(result, getCBackPtr(value));
|
||||
for (const auto &value : cppList) {
|
||||
result = bctbx_list_append(result, belle_sip_object_ref(getCBackPtr(value)));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -379,7 +380,7 @@ public:
|
|||
static inline bctbx_list_t *getResolvedCListFromCppList (const std::list<CppType> &cppList) {
|
||||
bctbx_list_t *result = nullptr;
|
||||
for (const auto &value : cppList)
|
||||
result = bctbx_list_append(result, getCBackPtr(value));
|
||||
result = bctbx_list_append(result, belle_sip_object_ref(getCBackPtr(value)));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue