Check for potential crasher.

Reported and suggested in [#27687] by Dean Giberson. Couldn't redo crash myself, but better safe than sorry :)
This commit is contained in:
Nathan Letwory
2011-08-30 15:43:00 +00:00
parent 9eb9d9b7d2
commit c6f994062e

View File

@@ -56,7 +56,7 @@ bool ExtraHandler::textData(const char* text, size_t textLength)
{
char buf[1024];
if(currentElement.length() == 0) return false;
if(currentElement.length() == 0 || currentExtraTags == 0) return false;
BLI_snprintf(buf, textLength+1, "%s", text);
currentExtraTags->addTag(currentElement, std::string(buf));