diff --git a/backends/gstreamer/rb-player-gst-xfade.c b/backends/gstreamer/rb-player-gst-xfade.c
index 0548804..e4e191d 100644
--- a/backends/gstreamer/rb-player-gst-xfade.c
+++ b/backends/gstreamer/rb-player-gst-xfade.c
@@ -2074,15 +2074,19 @@ add_stream_uri_tag (GstPad *pad, RBXFadeStream *stream)
 	 */
 
 	e = GST_ELEMENT (gst_pad_get_parent (target));
-	if (GST_IS_AUDIO_DECODER (e)) {
-		sink = gst_element_get_static_pad (e, "sink");
-		gst_pad_send_event (sink, gst_event_new_tag (t));
-		gst_object_unref (sink);
-	} else {
-		rb_debug ("not setting stream uri tag for %s", GST_OBJECT_NAME (e));
-	}
-	gst_object_unref (e);
-
+    if (e) {
+        if (GST_IS_AUDIO_DECODER (e)) {
+            sink = gst_element_get_static_pad (e, "sink");
+            gst_pad_send_event (sink, gst_event_new_tag (t));
+            gst_object_unref (sink);
+        } else {
+            rb_debug ("not setting stream uri tag for %s", GST_OBJECT_NAME (e));
+        }
+        gst_object_unref (e);
+    } else {
+        rb_debug ("not setting stream uri tag for NULL GstElement");
+    }
+    
 	gst_pad_remove_probe (target, probe_id);
 
 	gst_object_unref (target);