mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 19:23:13 +02:00
core: fix crash on "weechat --upgrade" if no .upgrade files are found
This commit is contained in:
@@ -720,6 +720,8 @@ irc_upgrade_load ()
|
||||
irc_upgrade_set_buffer_callbacks ();
|
||||
|
||||
upgrade_file = weechat_upgrade_new (IRC_UPGRADE_FILENAME, 0);
|
||||
if (!upgrade_file)
|
||||
return 0;
|
||||
rc = weechat_upgrade_read (upgrade_file, &irc_upgrade_read_cb, NULL);
|
||||
weechat_upgrade_close (upgrade_file);
|
||||
|
||||
|
||||
@@ -240,6 +240,8 @@ relay_upgrade_load ()
|
||||
relay_upgrade_set_buffer_callbacks ();
|
||||
|
||||
upgrade_file = weechat_upgrade_new (RELAY_UPGRADE_FILENAME, 0);
|
||||
if (!upgrade_file)
|
||||
return 0;
|
||||
rc = weechat_upgrade_read (upgrade_file, &relay_upgrade_read_cb, NULL);
|
||||
weechat_upgrade_close (upgrade_file);
|
||||
|
||||
|
||||
@@ -137,6 +137,8 @@ xfer_upgrade_load ()
|
||||
xfer_upgrade_set_buffer_callbacks ();
|
||||
|
||||
upgrade_file = weechat_upgrade_new (XFER_UPGRADE_FILENAME, 0);
|
||||
if (!upgrade_file)
|
||||
return 0;
|
||||
rc = weechat_upgrade_read (upgrade_file, &xfer_upgrade_read_cb, NULL);
|
||||
weechat_upgrade_close (upgrade_file);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user