summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/wee-upgrade.c2
-rw-r--r--src/gui/gui-buffer.c16
2 files changed, 13 insertions, 5 deletions
diff --git a/src/core/wee-upgrade.c b/src/core/wee-upgrade.c
index e9933230e..3bf0e8871 100644
--- a/src/core/wee-upgrade.c
+++ b/src/core/wee-upgrade.c
@@ -542,7 +542,7 @@ upgrade_weechat_read_cb (void *data,
hotlist_reset = 1;
}
plugin_name = infolist_string (infolist, "plugin_name");
- buffer_name = infolist_string (infolist, "plugin_name");
+ buffer_name = infolist_string (infolist, "buffer_name");
if (plugin_name && buffer_name)
{
ptr_buffer = gui_buffer_search_by_name (plugin_name,
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index b606b84fb..1428048f3 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -1210,15 +1210,23 @@ gui_buffer_search_by_name (const char *plugin, const char *name)
plugin_match = 1;
if (plugin && plugin[0])
{
- if (ptr_buffer->plugin)
+ if (ptr_buffer->plugin_name_for_upgrade)
{
- if (strcmp (plugin, ptr_buffer->plugin->name) != 0)
+ if (strcmp (plugin, ptr_buffer->plugin_name_for_upgrade) != 0)
plugin_match = 0;
}
else
{
- if (strcmp (plugin, PLUGIN_CORE) != 0)
- plugin_match = 0;
+ if (ptr_buffer->plugin)
+ {
+ if (strcmp (plugin, ptr_buffer->plugin->name) != 0)
+ plugin_match = 0;
+ }
+ else
+ {
+ if (strcmp (plugin, PLUGIN_CORE) != 0)
+ plugin_match = 0;
+ }
}
}
if (plugin_match && (strcmp (ptr_buffer->name, name) == 0))