Blame SOURCES/ceres-solver_bounds.patch

532ae3
diff -rupN ceres-solver-1.13.0/internal/ceres/compressed_row_sparse_matrix.cc ceres-solver-1.13.0-new/internal/ceres/compressed_row_sparse_matrix.cc
532ae3
--- ceres-solver-1.13.0/internal/ceres/compressed_row_sparse_matrix.cc	2017-08-03 09:10:55.000000000 +0200
532ae3
+++ ceres-solver-1.13.0-new/internal/ceres/compressed_row_sparse_matrix.cc	2018-07-28 22:31:51.989682309 +0200
532ae3
@@ -196,6 +196,11 @@ CompressedRowSparseMatrix* CompressedRow
532ae3
   CompressedRowSparseMatrix* output =
532ae3
       new CompressedRowSparseMatrix(num_rows, num_cols, input.num_nonzeros());
532ae3
 
532ae3
+  if (num_rows == 0) {
532ae3
+    // No data to copy.
532ae3
+    return output;
532ae3
+  }
532ae3
+
532ae3
   // Copy the contents of the cols and values array in the order given
532ae3
   // by index and count the number of entries in each row.
532ae3
   int* output_rows = output->mutable_rows();