[evolution/gtk3] GN-bug #640509 - Invalid cast in appointment editor	in express mode
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [evolution/gtk3] GN-bug #640509 - Invalid cast in appointment editor	in express mode
- Date: Tue, 25 Jan 2011 12:21:35 +0000 (UTC)
commit fd021e86c2505eac532becd41a6f17fecc5ce6d1
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jan 25 13:20:46 2011 +0100
    GN-bug #640509 - Invalid cast in appointment editor in express mode
 calendar/gui/dialogs/comp-editor.c |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index e4e609e..0115f85 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1421,19 +1421,22 @@ comp_editor_get_property (GObject *object,
 static void
 unref_page_cb (gpointer editor_page, gpointer comp_editor)
 {
-	GtkWidget *page_widget;
-	CompEditorPage *page = COMP_EDITOR_PAGE (editor_page);
-	CompEditor *editor = COMP_EDITOR (comp_editor);
+	if (IS_COMP_EDITOR_PAGE (editor_page)) {
+		GtkWidget *page_widget;
+		CompEditorPage *page = COMP_EDITOR_PAGE (editor_page);
+		CompEditor *editor = COMP_EDITOR (comp_editor);
 
-	g_return_if_fail (page != NULL);
-	g_return_if_fail (editor != NULL);
+		g_return_if_fail (page != NULL);
+		g_return_if_fail (editor != NULL);
+
+		page_widget = comp_editor_page_get_widget (page);
+		g_signal_handlers_disconnect_matched (
+			page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page);
+	}
 
-	page_widget = comp_editor_page_get_widget (page);
-	g_signal_handlers_disconnect_matched (
-		page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
 	g_signal_handlers_disconnect_matched (
-		page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page);
-	g_object_unref (page);
+		editor_page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, comp_editor);
+	g_object_unref (editor_page);
 }
 
 static void
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]