summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b5cfc93)
raw | patch | inline | side by side (parent: b5cfc93)
author | Kalle Wallin <kaw@linux.se> | |
Sun, 19 Dec 2004 13:08:21 +0000 (13:08 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Sun, 19 Dec 2004 13:08:21 +0000 (13:08 +0000) |
src/screen_file.c | patch | blob | history |
diff --git a/src/screen_file.c b/src/screen_file.c
index 75095db9a1bfdbe2e5e9fb9253aba700f7b52a3b..aff58a526e01a0f0ffe66db216d763d053dd9232 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
filelist_entry_t *entry;
mpd_InfoEntity *entity;
+ if ( filelist==NULL )
+ return -1;
entry = ( filelist_entry_t *) g_list_nth_data(filelist->list, lw->selected);
if( entry==NULL )
return -1;
{
filelist_entry_t *entry;
+ if ( filelist==NULL )
+ return -1;
entry=( filelist_entry_t *) g_list_nth_data(filelist->list, lw->selected);
if( entry==NULL || entry->entity==NULL)
return -1;
int row;
int prev_selected = lw->selected;
unsigned long bstate;
+ int length;
- if( screen_get_mouse_event(c, lw, filelist->length, &bstate, &row) )
+ if ( filelist )
+ length = filelist->length;
+ else
+ length = 0;
+
+ if( screen_get_mouse_event(c, lw, length, &bstate, &row) )
return 1;
lw->selected = lw->start+row;
- list_window_check_selected(lw, filelist->length);
+ list_window_check_selected(lw, length);
if( bstate & BUTTON1_CLICKED )
{