Browse Source

assert before resize

Former-commit-id: 89a2c7a6b72dfc64b86e47a01cbbe2528dbf570a
Alec Jacobson 9 years ago
parent
commit
c9a3b471a9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/igl/slice_mask.cpp

+ 1 - 1
include/igl/slice_mask.cpp

@@ -55,8 +55,8 @@ IGL_INLINE void igl::slice_mask(
     case 1:
     {
       const int ym = R.count();
-      Y.resize(ym,X.cols());
       assert(X.rows() == R.size() && "X.rows() should match R.size()");
+      Y.resize(ym,X.cols());
       {
         int yi = 0;
         for(int i = 0;i<X.rows();i++)