svg_loader SvgLoader: Prevent invalid access

If there is no path information, it is not copied.
This commit is contained in:
JunsuChoi 2021-06-22 16:15:05 +09:00 committed by Mira Grudzinska
parent ea668eae1d
commit a2d348242b

View file

@ -1621,7 +1621,7 @@ static void _copyAttr(SvgNode* to, const SvgNode* from)
break; break;
} }
case SvgNodeType::Path: { case SvgNodeType::Path: {
to->node.path.path = new string(from->node.path.path->c_str()); if (from->node.path.path) to->node.path.path = new string(from->node.path.path->c_str());
break; break;
} }
case SvgNodeType::Polygon: { case SvgNodeType::Polygon: {