aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 7b4cc1d43..b697b4d0b 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1238,7 +1238,7 @@ empathy_window_get_is_visible (GtkWindow *window)
g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
- gdk_window = GTK_WIDGET (window)->window;
+ gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
if (!gdk_window) {
return FALSE;
}
@@ -1260,7 +1260,7 @@ empathy_window_iconify (GtkWindow *window, GtkStatusIcon *status_icon)
GdkWindow *gdk_window;
gtk_status_icon_get_geometry (status_icon, NULL, &icon_location, NULL);
- gdk_window = GTK_WIDGET (window)->window;
+ gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
dpy = gdk_x11_drawable_get_xdisplay (gdk_window);
data[0] = icon_location.x;
@@ -1329,6 +1329,8 @@ empathy_get_toplevel_window (GtkWidget *widget)
static gchar *
fixup_url (const gchar *url)
{
+ g_return_val_if_fail (url != NULL, NULL);
+
if (g_str_has_prefix (url, "ghelp:") ||
g_str_has_prefix (url, "mailto:") ||
strstr (url, ":/")) {
@@ -1349,6 +1351,9 @@ empathy_url_show (GtkWidget *parent,
gchar *real_url;
GError *error = NULL;
+ g_return_if_fail (GTK_IS_WIDGET (parent));
+ g_return_if_fail (url != NULL);
+
real_url = fixup_url (url);
if (real_url) {
url = real_url;