diff --git a/src/libcamera/matrix.cpp b/src/libcamera/matrix.cpp index ed22263b5..b7c07e896 100644 --- a/src/libcamera/matrix.cpp +++ b/src/libcamera/matrix.cpp @@ -229,7 +229,7 @@ bool matrixInvert(Span dataIn, Span dataOut, unsigned int dim, * Locate the next pivot. To improve numerical stability, use * the row with the largest value in the pivot's column. */ - unsigned int row; + unsigned int row = pivot; T maxValue{ 0 }; for (unsigned int i = pivot; i < dim; ++i) {