Commit 25c1f7b
fix: add input validation to prevent runtime errors in rendering functions
Added comprehensive input validation to render_line_plot and render_markers
to prevent runtime errors when plot_data arrays are unallocated or empty.
This fixes the streamplot_demo crash that was blocking test-coverage CI.
- Check if x/y arrays are allocated before accessing
- Validate array sizes are non-zero
- Ensure x and y arrays have matching sizes
- Early return for invalid data instead of crashing
Fixes test-coverage CI failure caused by streamplot_demo runtime error.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 0878dbb commit 25c1f7b
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
77 | 87 | | |
78 | 88 | | |
79 | 89 | | |
| |||
0 commit comments