gltrace: Fix NPE

Change-Id: Id7af9cd388f3508201f96a0624966c2ce01b4da5
This commit is contained in:
Siva Velusamy 2012-10-01 14:30:48 -07:00
parent 302a733a8b
commit 090503a01c

View File

@ -236,11 +236,9 @@ void fixup_glShaderSource(GLMessage *glmsg, void *pointersToFixup[]) {
::std::string src = ""; ::std::string src = "";
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
if (lengthp != NULL) if (lengthp != NULL)
src.append(*stringpp, *lengthp); src.append(*stringpp++, *lengthp++);
else else
src.append(*stringpp); // assume null terminated src.append(*stringpp++); // assume null terminated
stringpp++;
lengthp++;
} }
arg_strpp->add_charvalue(src); arg_strpp->add_charvalue(src);