mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 16:23:14 +02:00
core: return empty string for window and buffer pointers in focus hashtable when value is N/A
This commit is contained in:
@@ -1475,7 +1475,7 @@ gui_bar_item_focus_buffer_nicklist (void *data,
|
||||
|
||||
window = (struct t_gui_window *)value;
|
||||
if (!window)
|
||||
window = gui_current_window;
|
||||
return NULL;
|
||||
|
||||
error = NULL;
|
||||
bar_item_line = (int) strtol (str_bar_item_line, &error, 10);
|
||||
|
||||
+10
-3
@@ -52,9 +52,16 @@
|
||||
snprintf (str_value, sizeof (str_value), "%ld", __time); \
|
||||
hashtable_set (hashtable, __name, str_value);
|
||||
#define FOCUS_PTR(__name, __pointer) \
|
||||
snprintf (str_value, sizeof (str_value), \
|
||||
"0x%lx", (long unsigned int)__pointer); \
|
||||
hashtable_set (hashtable, __name, str_value);
|
||||
if (__pointer) \
|
||||
{ \
|
||||
snprintf (str_value, sizeof (str_value), \
|
||||
"0x%lx", (long unsigned int)__pointer); \
|
||||
hashtable_set (hashtable, __name, str_value); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
hashtable_set (hashtable, __name, ""); \
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user