Check pointer before using it.
git-svn-id: http://voip.null.ro/svn/yate@3361 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
77b4c13994
commit
3c1053ba3e
|
@ -863,9 +863,9 @@ XmlElement* XMPPUtils::createIq(IqType type, const char* from,
|
|||
XmlElement* XMPPUtils::createIqError(const char* from, const char* to, XmlElement*& xml,
|
||||
int type, int error, const char* text)
|
||||
{
|
||||
const char* id = xml->attribute("id");
|
||||
const char* id = xml ? xml->attribute("id") : 0;
|
||||
XmlElement* iq = createIq(XMPPUtils::IqError,from,to,id);
|
||||
if (TelEngine::null(id)) {
|
||||
if (TelEngine::null(id) && xml) {
|
||||
iq->addChild(xml);
|
||||
xml = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue