--- librsvg-2.9.5/rsvg-defs.c	2005/03/03 02:16:13	1.1
+++ librsvg-2.9.5/rsvg-defs.c	2005/03/03 02:20:15
@@ -72,18 +72,20 @@ rsvg_defs_load_extern(const RsvgDefs *de
 
 	chars = _rsvg_acquire_xlink_href_resource(name, defs->base_uri, NULL);
 
-	handle = rsvg_handle_new ();
+	if (chars) {
+		handle = rsvg_handle_new ();
 
-	base_uri = rsvg_get_base_uri_from_filename(filename);
-	rsvg_handle_set_base_uri (handle, base_uri);
-	g_free(base_uri);
-
-	rsvg_handle_write (handle, chars->data, chars->len, NULL);
-	g_byte_array_free (chars, TRUE);
-	
-	rsvg_handle_close (handle, NULL);
-	
-	g_hash_table_insert (defs->externs, g_strdup (name), handle);
+		base_uri = rsvg_get_base_uri_from_filename(filename);
+		rsvg_handle_set_base_uri (handle, base_uri);
+		g_free(base_uri);
+
+		rsvg_handle_write (handle, chars->data, chars->len, NULL);
+		g_byte_array_free (chars, TRUE);
+		
+		rsvg_handle_close (handle, NULL);
+		
+		g_hash_table_insert (defs->externs, g_strdup (name), handle);
+	}
 
 	g_free(filename);
 	return 0;
