aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Obergrusberger <tradiaz@yahoo.de>2007-03-29 15:34:34 +0000
committerAndreas Obergrusberger <tradiaz@yahoo.de>2007-03-29 15:34:34 +0000
commit426c6c4c7fd400cc3bec6d73de36b0ac58e12419 (patch)
treefdf7a0c846b8d530ffe53993f440df3f64640ea7 /src
parent8e62770fbac433135948c003957832ed37b3f0d7 (diff)
downloadmpd-426c6c4c7fd400cc3bec6d73de36b0ac58e12419.tar.gz
mpd-426c6c4c7fd400cc3bec6d73de36b0ac58e12419.tar.xz
mpd-426c6c4c7fd400cc3bec6d73de36b0ac58e12419.zip
fix segfault
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5773 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/screen_lyrics.c10
-rw-r--r--src/src_lyrics.c1
2 files changed, 8 insertions, 3 deletions
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 03a474ff8..c5876f30a 100644
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
@@ -115,7 +115,7 @@ gpointer get_lyr(void *c)
char artist[MAX_SONGNAME_LENGTH];
char title[MAX_SONGNAME_LENGTH];
- lock = 2;
+ lock=2;
result = 0;
formed_text_init(&lyr_text);
@@ -132,7 +132,11 @@ gpointer get_lyr(void *c)
if (((retrieval_spec*)c)->way != -1) /*till it'S of use*/
{
- if(get_lyr_by_src (src_selection, artist, title) != 0) return NULL;
+ if(get_lyr_by_src (src_selection, artist, title) != 0)
+ {
+ lock=0;
+ return NULL;
+ }
}
/*else{
if(get_lyr_hd(artist, title) != 0)
@@ -141,7 +145,7 @@ gpointer get_lyr(void *c)
}
else result |= 1;
}*/
-
+ //return NULL;
lw->start = 0;
check_repaint();
lock = 1;
diff --git a/src/src_lyrics.c b/src/src_lyrics.c
index 10d0dce51..395a24b16 100644
--- a/src/src_lyrics.c
+++ b/src/src_lyrics.c
@@ -145,6 +145,7 @@ int src_lyr_init ()
int get_lyr_by_src (int priority, char *artist, char *title)
{
+ if(src_lyr_stack->len == 0) return -1;
//if (g_array_index (src_lyr_stack, src_lyr*, priority)->check_lyr() == 0)
//{
g_array_index (src_lyr_stack, src_lyr*, priority)->get_lyr (artist, title);