]> git.meshlink.io Git - catta/commitdiff
avahi-ui: fix segfault when browsing for services in non-existing domains or domains...
authorLennart Poettering <lennart@poettering.net>
Fri, 20 Apr 2007 13:17:49 +0000 (13:17 +0000)
committerLennart Poettering <lennart@poettering.net>
Fri, 20 Apr 2007 13:17:49 +0000 (13:17 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1448 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-ui/avahi-ui.c

index a2a73d5956e9e10a5ae7e264e185623f538196e3..79aeb73c50817ed9e9c322fae1f57b3159c15811 100644 (file)
@@ -608,6 +608,7 @@ static const gchar *get_domain_name(AuiServiceDialog *d) {
     const gchar *domain;
     
     g_return_val_if_fail(d, NULL);
+    g_return_val_if_fail(AUI_IS_SERVICE_DIALOG(d), NULL);
     
     if (d->priv->domain)
         return d->priv->domain;
@@ -692,7 +693,7 @@ static gboolean start_callback(gpointer data) {
     gtk_widget_show(d->priv->service_progress_bar);
 
     if (d->priv->service_pulse_timeout <= 0)
-        d->priv->service_pulse_timeout = g_timeout_add(100, service_pulse_callback, d->priv);
+        d->priv->service_pulse_timeout = g_timeout_add(100, service_pulse_callback, d);
 
     for (i = 0; d->priv->browse_service_types[i]; i++)
         ;
@@ -872,7 +873,7 @@ static void domain_entry_changed_callback(GtkEditable *editable, gpointer user_d
     gtk_widget_set_sensitive(d->priv->domain_ok_button, is_valid_domain_suffix(gtk_entry_get_text(GTK_ENTRY(d->priv->domain_entry))));
 }
 
-static void domain_button_clicked(GtkButton *button,  gpointer user_data) {
+static void domain_button_clicked(GtkButton *button, gpointer user_data) {
     GtkWidget *vbox, *vbox2, *scrolled_window;
     GtkTreeSelection *selection;
     GtkCellRenderer *renderer;