diff options
Diffstat (limited to 'Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp')
-rw-r--r-- | Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp b/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp index 76925af..6e1082c 100644 --- a/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp +++ b/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp @@ -53,6 +53,7 @@ void StreamInitiationParser::handleStartElement(const String& element, const Str currentText.clear(); } else if (inFeature && formParserFactory->canParse(element, ns, attributes)) { + assert(!formParser); formParser = dynamic_cast<FormParser*>(formParserFactory->createPayloadParser()); } } @@ -100,6 +101,8 @@ void StreamInitiationParser::handleEndElement(const String& element, const Strin } } } + delete formParser; + formParser = NULL; } } } |