File: matplotlib_nullptr_s390x.patch

package info (click to toggle)
vtk9 9.5.2%2Bdfsg3-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 205,984 kB
  • sloc: cpp: 2,336,570; ansic: 327,116; python: 111,200; yacc: 4,104; java: 3,977; sh: 3,032; xml: 2,771; perl: 2,189; lex: 1,787; makefile: 181; javascript: 165; objc: 153; tcl: 59
file content (17 lines) | stat: -rw-r--r-- 746 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: vtk9/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx
===================================================================
--- vtk9.orig/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx	2026-01-25 23:22:22.741023671 +0100
+++ vtk9/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx	2026-02-05 12:10:11.414134274 +0100
@@ -1029,6 +1029,12 @@
     {
       unsigned char* ptr = static_cast<unsigned char*>(image->GetScalarPointer(col, row, 0));
 
+      if (ptr == nullptr)
+      {
+	vtkErrorMacro("image returned null ScalarPointer.");
+	return false;
+      }
+
       // Background, do not load python data
       if (row > pythonRowStart || col < pythonColStart || row <= pythonRowEnd ||
         col >= pythonColEnd)