Skip to content

cairo-context: Special-case 0-sized vector

Florian Müllner requested to merge fmuellner/gjs:dash-crash into master

gcc's libstdc++ enables stricter checks when code is compiled with _GLIBCXX_ASSERTIONS, including bound checks for std::vector's [] operator.

We currently hit this assertion when setDash() is called with an empty array (which is legal with regard to the underlying cairo API). Fix by handling that case explicitly.

Merge request reports