summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp')
-rw-r--r--Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp b/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp
index 1897080..58b0af0 100644
--- a/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp
+++ b/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp
@@ -34,7 +34,7 @@ void SecurityLabelsCatalogParser::handleStartElement(const std::string& element,
currentItem_->setSelector(attributes.getAttribute("selector"));
currentItem_->setIsDefault(attributes.getBoolAttribute("default", false));
}
- else if (level_ == LabelLevel) {
+ else if (level_ == LabelLevel && currentItem_) {
assert(!labelParser_);
if (labelParserFactory_->canParse(element, ns, attributes)) {
labelParser_ = dynamic_cast<SecurityLabelParser*>(labelParserFactory_->createPayloadParser());