1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Avoided a clang analyser warning in the introjucer.

This commit is contained in:
jules 2016-03-16 16:23:33 +00:00
parent 5ba43d6125
commit 39f8995c49

View file

@ -127,10 +127,10 @@ PaintElement* PaintRoutine::addElementFromXml (const XmlElement& xml, const int
{
selectedPoints.deselectAll();
if (undoable)
if (undoable && document != nullptr)
{
AddXmlElementAction* action = new AddXmlElementAction (*this, new XmlElement (xml));
perform (action, "Add new element");
document->getUndoManager().perform (action, "Add new element");
return elements [action->indexAdded];
}