From 27779c87187095caec61bf10dcb8e379e58639dd Mon Sep 17 00:00:00 2001 From: Takahito Tejima Date: Thu, 23 Aug 2012 12:05:04 -0700 Subject: [PATCH] fix crash bug of mayaViewer with edgeCreases --- examples/mayaPtexViewer_siggraph2012/hbrUtil.cpp | 2 +- examples/mayaViewer/hbrUtil.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mayaPtexViewer_siggraph2012/hbrUtil.cpp b/examples/mayaPtexViewer_siggraph2012/hbrUtil.cpp index 81a5bb2f..2979c069 100644 --- a/examples/mayaPtexViewer_siggraph2012/hbrUtil.cpp +++ b/examples/mayaPtexViewer_siggraph2012/hbrUtil.cpp @@ -159,7 +159,7 @@ OpenSubdiv::OsdHbrMesh * ConvertToHBR(int nVertices, } nEdgeCreases = (int)edgeCreases2.size(); for (int i = 0; i < nEdgeCreases; ++i) { - if( edgeCreases1[i] <= 0. ) + if( edgeCreases2[i] <= 0. ) continue; OpenSubdiv::OsdHbrVertex * v0 = hbrMesh->GetVertex(edgeCrease2Indices[i*2]); diff --git a/examples/mayaViewer/hbrUtil.cpp b/examples/mayaViewer/hbrUtil.cpp index c156e5a9..bf49a46d 100644 --- a/examples/mayaViewer/hbrUtil.cpp +++ b/examples/mayaViewer/hbrUtil.cpp @@ -154,7 +154,7 @@ OpenSubdiv::OsdHbrMesh * ConvertToHBR(int nVertices, } nEdgeCreases = (int)edgeCreases2.size(); for (int i = 0; i < nEdgeCreases; ++i) { - if( edgeCreases1[i] <= 0. ) + if( edgeCreases2[i] <= 0. ) continue; OpenSubdiv::OsdHbrVertex * v0 = hbrMesh->GetVertex(edgeCrease2Indices[i*2]);