mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Fix stanza_get_child_by_name_and_ns() if no name
Fix bug introduced in 68af0aad65
.
This commit is contained in:
parent
9bc4dc3827
commit
196e029b47
@ -2484,9 +2484,11 @@ stanza_get_child_by_name_and_ns(xmpp_stanza_t * const stanza, const char * const
|
|||||||
{
|
{
|
||||||
xmpp_stanza_t *child;
|
xmpp_stanza_t *child;
|
||||||
const char *child_ns;
|
const char *child_ns;
|
||||||
|
const char *child_name;
|
||||||
|
|
||||||
for (child = xmpp_stanza_get_children(stanza); child; child = xmpp_stanza_get_next(child)) {
|
for (child = xmpp_stanza_get_children(stanza); child; child = xmpp_stanza_get_next(child)) {
|
||||||
if (strcmp(name, xmpp_stanza_get_name(child)) == 0) {
|
child_name = xmpp_stanza_get_name(child);
|
||||||
|
if (child_name && strcmp(name, child_name) == 0) {
|
||||||
child_ns = xmpp_stanza_get_ns(child);
|
child_ns = xmpp_stanza_get_ns(child);
|
||||||
if (child_ns && strcmp(ns, child_ns) == 0) {
|
if (child_ns && strcmp(ns, child_ns) == 0) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user