Index: window.c =================================================================== RCS file: /cvsroot/lyrc/lyrc/unix/xmms/window.c,v retrieving revision 1.39 diff -u -u -r1.39 window.c --- window.c 23 Feb 2004 04:20:24 -0000 1.39 +++ window.c 10 May 2005 21:15:14 -0000 @@ -172,9 +172,24 @@ if (filename && strstr(filename,".xml")) { /* xml file */ xmlDocPtr doc; - xmlNodePtr node,node2; + xmlNodePtr node=NULL,node2; doc=xmlParseFile(filename); - node = xmlDocGetRootElement(doc); + if( doc != NULL ) + node = xmlDocGetRootElement(doc); + if( node == NULL ) { + source=(gchar *) strdup(_("Received data are invalid!")); + lyric1=gtk_text_new(NULL,NULL); + gtk_text_set_word_wrap(GTK_TEXT(lyric1),TRUE); + gtk_text_insert(GTK_TEXT(lyric1),font,NULL,NULL,source,-1); + gtk_widget_modify_style(lyric1, rc_style); + gtk_fixed_put(GTK_FIXED(lyrics_layout),lyric1,10,10); + gtk_widget_show(lyric1); + width=get_width(source,font); + height=get_height(source,font); + free(source); + gtk_widget_set_usize(lyric1, width+10,height*2); + return; + } if (!xmlStrcmp(node->name, (const xmlChar *) "lyrc")) { node=node->xmlChildrenNode;