From: Debian Science Maintainers Date: Fri, 8 May 2026 12:41:38 +0000 (+0200) Subject: matplotlib_nullptr_s390x X-Git-Tag: archive/raspbian/9.5.2+dfsg4-4+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a6c1c54c03dd7c0099aadbe22e13a6c90fac2065;p=vtk9.git matplotlib_nullptr_s390x =================================================================== Gbp-Pq: Name matplotlib_nullptr_s390x.patch --- diff --git a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx index d8261ac29..dcff6556f 100644 --- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx +++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx @@ -1029,6 +1029,12 @@ bool vtkMatplotlibMathTextUtilities::RenderOneCell(vtkImageData* image, int bbox { unsigned char* ptr = static_cast(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)