diff options
-rw-r--r-- | source/blender/editors/interface/interface_query.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c index d0075ba8617..83e48fad157 100644 --- a/source/blender/editors/interface/interface_query.c +++ b/source/blender/editors/interface/interface_query.c @@ -463,6 +463,10 @@ size_t ui_but_drawstr_len_without_sep_char(const uiBut *but) size_t ui_but_tip_len_only_first_line(const uiBut *but) { + if (but->tip == NULL) { + return 0; + } + const char *str_sep = strchr(but->tip, '\n'); if (str_sep != NULL) { return (str_sep - but->tip); |