[svn r158] Fixes seg fault when getting URI fields.
1.1 --- a/gmyth/src/gmyth_uri.h Thu Nov 30 21:05:13 2006 +0000
1.2 +++ b/gmyth/src/gmyth_uri.h Thu Nov 30 21:25:06 2006 +0000
1.3 @@ -104,15 +104,15 @@
1.4 GType gmyth_uri_get_type (void);
1.5 GMythURI* gmyth_uri_new (void);
1.6 GMythURI* gmyth_uri_new_with_value (const gchar *value);
1.7 -gboolean gmyth_uri_is_equals (GMythURI* uri1, GMythURI* uri2);
1.8 -#define gmyth_uri_get_host(urip) (urip->host->str)
1.9 -#define gmyth_uri_get_port(urip) (urip->port)
1.10 -#define gmyth_uri_get_protocol(urip) (urip->protocol->str)
1.11 -#define gmyth_uri_get_path(urip) (urip->path->str)
1.12 -#define gmyth_uri_get_user(urip) (urip->user->str)
1.13 -#define gmyth_uri_get_password(urip) (urip->password->str)
1.14 -#define gmyth_uri_get_fragment(urip) (urip->fragment->str)
1.15 -#define gmyth_uri_get_query(urip) (urip->query->str)
1.16 +gboolean gmyth_uri_is_equals (GMythURI* uri1, GMythURI* uri2);
1.17 +#define gmyth_uri_get_host(urip) ( urip->host != NULL ? urip->host->str : "" )
1.18 +#define gmyth_uri_get_port(urip) (urip->port)
1.19 +#define gmyth_uri_get_protocol(urip) ( urip->protocol != NULL ? urip->protocol->str : "" )
1.20 +#define gmyth_uri_get_path(urip) ( urip->path != NULL ? urip->path->str : "" )
1.21 +#define gmyth_uri_get_user(urip) ( urip->user != NULL ? urip->user->str : "" )
1.22 +#define gmyth_uri_get_password(urip) ( urip->password != NULL ? urip->password->str : "" )
1.23 +#define gmyth_uri_get_fragment(urip) ( urip->fragment != NULL ? urip->fragment->str : "" )
1.24 +#define gmyth_uri_get_query(urip) ( urip->query != NULL ? urip->query->str : "" )
1.25
1.26 G_END_DECLS
1.27