1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

window_find_item() was buggy if window argument was NULL

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@878 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-11-26 03:52:02 +00:00 committed by cras
parent 7ef53cbe0d
commit 504dedeb4e

View File

@ -288,7 +288,8 @@ WINDOW_REC *window_find_item(WINDOW_REC *window, const char *name)
item = window == NULL ? NULL :
window_item_find(window->active_server, name);
if (item == NULL && window->active_server != NULL) {
if (item == NULL && (window == NULL ||
window->active_server != NULL)) {
/* not found from the active server - any server? */
item = window_item_find(NULL, name);
}