Check path size before fill/stroke


Avoid assert if calling fill/stroke without adding any path commands.
The minimum amount of commands for stroke is 2 and for fill and clear 3,
to get an area. Confirmed this behavior to match with HTML 2d context.

Pick-to: 6.11
Change-Id: I7c471d84a1f82ce41b7c01ebca310da319dff528
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
commit90615fedf8c85a9cf451475e659e4998b734fbd3
parent12cb3cba81153cb409c32e37b1bb85c485acf3f7
authorKaj Grönholm <kaj.gronholm@qt.io>
committerKaj Grönholm <kaj.gronholm@qt.io>
commit timeMon, 5 Jan 2026 12:07:31 +0200