Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Add missing switch case to VectorPath constructor

Agata Cackod9a0480c1301
diff --git a/libs/global/kis_algebra_2d.cpp b/libs/global/kis_algebra_2d.cpp
index 7a51984586..175b7c860c 100644
--- a/libs/global/kis_algebra_2d.cpp
+++ b/libs/global/kis_algebra_2d.cpp
@@ -2061,6 +2061,9 @@ VectorPath::VectorPath(const QPainterPath &path)
case QPainterPath::LineToElement:
m_points.append(VPoint(VPoint::LineTo, el));
break;
+ case QPainterPath::CurveToDataElement:
+ KIS_SAFE_ASSERT_RECOVER_BREAK(false);
+ break;
case QPainterPath::CurveToElement:
KIS_SAFE_ASSERT_RECOVER(i + 2 < path.elementCount()) { continue; }
KIS_SAFE_ASSERT_RECOVER(path.elementAt(i + 1).type == QPainterPath::CurveToDataElement) { continue; }