Fix for bug #7851: crash with LSCM unwrap, due to opennl refactor.
[blender.git] / intern / opennl / intern / opennl.c
index 2d30da075d33979db1b62cf3e84809ac3e350dec..d779e861cb6947d7483704975b07c6132c0f0b0e 100644 (file)
@@ -240,7 +240,7 @@ static void __nlSparseMatrixConstruct(
        M->storage = storage;
        if(storage & __NL_ROWS) {
                M->row = __NL_NEW_ARRAY(__NLRowColumn, m);
-               for(i=0; i<n; i++) {
+               for(i=0; i<m; i++) {
                        __nlRowColumnConstruct(&(M->row[i]));
                }
        } else {