diff options
Diffstat (limited to 'src/mesa/main/objectlabel.c')
-rw-r--r-- | src/mesa/main/objectlabel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/objectlabel.c b/src/mesa/main/objectlabel.c index b622d6a2979..b77cb5c4e36 100644 --- a/src/mesa/main/objectlabel.c +++ b/src/mesa/main/objectlabel.c @@ -104,6 +104,11 @@ copy_label(const GLchar *src, GLchar *dst, GLsizei *length, GLsizei bufSize) * will be returned in <length>." */ + if (bufSize == 0) { + if (length) + *length = strlen(src); + return; + } if (src) labelLen = strlen(src); |