[Bf-blender-cvs] [2f5a79b3906] master: Fix button label access returning empty label

Campbell Barton noreply at git.blender.org
Wed Jun 19 04:06:46 CEST 2019


Commit: 2f5a79b390627e6f75d97eb7c2099dbe3d566fb5
Author: Campbell Barton
Date:   Wed Jun 19 11:29:51 2019 +1000
Branches: master
https://developer.blender.org/rB2f5a79b390627e6f75d97eb7c2099dbe3d566fb5

Fix button label access returning empty label

The check the buttons string has content (not just that it's non-NULL).

===================================================================

M	source/blender/editors/interface/interface.c

===================================================================

diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 9612eab0025..4b1bdc4a534 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -6324,7 +6324,7 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
     char *tmp = NULL;
 
     if (type == BUT_GET_LABEL) {
-      if (but->str) {
+      if (but->str && but->str[0]) {
         const char *str_sep;
         size_t str_len;



More information about the Bf-blender-cvs mailing list