From 090503a01c457feb6e64facfc7eb50c1f5612c6b Mon Sep 17 00:00:00 2001 From: Siva Velusamy Date: Mon, 1 Oct 2012 14:30:48 -0700 Subject: [PATCH] gltrace: Fix NPE Change-Id: Id7af9cd388f3508201f96a0624966c2ce01b4da5 --- opengl/libs/GLES_trace/src/gltrace_fixup.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp index 1bd790ebf..0e2fc1719 100644 --- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp +++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp @@ -236,11 +236,9 @@ void fixup_glShaderSource(GLMessage *glmsg, void *pointersToFixup[]) { ::std::string src = ""; for (int i = 0; i < count; i++) { if (lengthp != NULL) - src.append(*stringpp, *lengthp); + src.append(*stringpp++, *lengthp++); else - src.append(*stringpp); // assume null terminated - stringpp++; - lengthp++; + src.append(*stringpp++); // assume null terminated } arg_strpp->add_charvalue(src);