commit 52d6818f4431f49a0add0e448385eeb943f43b2f
Author: phantomjinx <[email protected]>
Date: Sun Feb 14 22:29:00 2010 +0000
Avoid segfault during drag n drop of cover art
- display_coverart.c
Check avoids possible sigsev if cover cannot be found in the cover art
array. Possible to occur if coverart collection is empty.
src/display_coverart.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/display_coverart.c b/src/display_coverart.c
index 09b0dc6..af661e2 100644
--- a/src/display_coverart.c
+++ b/src/display_coverart.c
@@ -2117,6 +2117,12 @@ static void dnd_coverart_drag_data_received(GtkWidget
*widget, GdkDragContext *d
/* Find the display cover item in the cover display */
cover = g_ptr_array_index(cdwidget->cdcovers, IMG_MAIN);
+ if (!cover) {
+ /* looks like there are no covers yet something got dragged into it */
+ gtk_drag_finish (dc, FALSE, FALSE, time);
+ return;
+ }
+
tracks = cover->album->tracks;
switch (info)
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2