Fix crash creating a custom brush without "Type" option and restarting

This commit is contained in:
David Capello 2016-02-23 18:06:19 -03:00
parent 12ec08f97f
commit 55f60be79a

View File

@ -310,7 +310,7 @@ void AppBrushes::load(const std::string& filename)
if (angle) flags |= int(BrushSlot::Flags::BrushAngle);
brush.reset(
new Brush(
string_id_to_brush_type(type),
(type ? string_id_to_brush_type(type): kFirstBrushType),
(size ? base::convert_to<int>(std::string(size)): 1),
(angle ? base::convert_to<int>(std::string(angle)): 0)));
}