summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/objectlabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/objectlabel.c')
-rw-r--r--src/mesa/main/objectlabel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/objectlabel.c b/src/mesa/main/objectlabel.c
index b77cb5c4e36..5070b008792 100644
--- a/src/mesa/main/objectlabel.c
+++ b/src/mesa/main/objectlabel.c
@@ -104,13 +104,14 @@ copy_label(const GLchar *src, GLchar *dst, GLsizei *length, GLsizei bufSize)
* will be returned in <length>."
*/
+ if (src)
+ labelLen = strlen(src);
+
if (bufSize == 0) {
if (length)
- *length = strlen(src);
+ *length = labelLen;
return;
}
- if (src)
- labelLen = strlen(src);
if (dst) {
if (src) {