diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-08-31 13:23:46 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-08-31 13:23:46 +0800 |
commit | 9ea10deea3b27d7bde1b82792cae76b99b5610f6 (patch) | |
tree | 0ca0584e525ab8ff7e1e24ec61437406dcbcf5d4 | |
parent | 095302aef20099e51739209a4e4229379da85047 (diff) | |
download | gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.gz gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.bz2 gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.lz gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.xz gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.tar.zst gsoc2013-evolution-9ea10deea3b27d7bde1b82792cae76b99b5610f6.zip |
Move away from g_asserts from g_return*.
svn path=/trunk/; revision=34142
-rw-r--r-- | widgets/ChangeLog | 10 | ||||
-rw-r--r-- | widgets/e-timezone-dialog/e-timezone-dialog.c | 4 | ||||
-rw-r--r-- | widgets/misc/ChangeLog | 14 | ||||
-rw-r--r-- | widgets/misc/e-canvas.c | 2 | ||||
-rw-r--r-- | widgets/misc/e-cursors.c | 8 | ||||
-rw-r--r-- | widgets/misc/e-expander.c | 3 | ||||
-rw-r--r-- | widgets/misc/e-search-bar.c | 4 | ||||
-rw-r--r-- | widgets/misc/e-selection-model.c | 4 | ||||
-rw-r--r-- | widgets/misc/e-spinner.c | 24 | ||||
-rw-r--r-- | widgets/misc/e-task-bar.c | 2 | ||||
-rw-r--r-- | widgets/table/ChangeLog | 23 | ||||
-rw-r--r-- | widgets/table/e-cell-text.c | 6 | ||||
-rw-r--r-- | widgets/table/e-table-config.c | 10 | ||||
-rw-r--r-- | widgets/table/e-table-group.c | 26 | ||||
-rw-r--r-- | widgets/table/e-table-header-utils.c | 9 | ||||
-rw-r--r-- | widgets/table/e-table-item.c | 13 | ||||
-rw-r--r-- | widgets/table/e-tree-table-adapter.c | 2 | ||||
-rw-r--r-- | widgets/text/e-completion-view.c | 2 | ||||
-rw-r--r-- | widgets/text/e-table-text-model.c | 2 | ||||
-rw-r--r-- | widgets/text/e-text-model-uri.c | 2 |
20 files changed, 109 insertions, 61 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog index 5d3f295045..8f2836b042 100644 --- a/widgets/ChangeLog +++ b/widgets/ChangeLog @@ -1,3 +1,13 @@ +2007-08-31 Srinivasa Ragavan <sragavan@novell.com> + + ** Move away from g_assert to g_return* critical warnings to debug + them better. + + * e-timezone-dialog/e-timezone-dialog.c: (get_zone_from_point): + * text/e-completion-view.c: (e_completion_view_set_cursor_row): + * text/e-table-text-model.c: (e_table_text_model_dispose): + * text/e-text-model-uri.c: (objectify_idle_cb): + 2007-08-24 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #411619 diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index 4bb404ee53..86ecba550f 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -634,9 +634,7 @@ get_zone_from_point (ETimezoneDialog *etd, } } - g_assert_not_reached (); - - return NULL; + g_return_val_if_reached(NULL); } diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 167ab2cbb7..b8eeae44c8 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,17 @@ +2007-08-31 Srinivasa Ragavan <sragavan@novell.com> + + ** Move away from g_assert to g_return* critical warnings to debug + them better. + + * e-canvas.c: (e_canvas_button): + * e-cursors.c: (create_bitmap_and_mask_from_xpm), (e_cursors_init): + * e-expander.c: (e_expander_focus): + * e-search-bar.c: (clear_button_state_changed), (search_verb_cb): + * e-selection-model.c: (e_selection_model_do_something), + (e_selection_model_select_as_key_press): + * e-spinner.c: (e_spinner_images_load), (e_spinner_expose): + * e-task-bar.c: (reduce_displayed_activities_per_component): + 2007-08-16 Milan Crha <mcrha@redhat.com> ** Part of fix for bug #350539 diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index be6ae0d93c..e2626c45f2 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -531,7 +531,7 @@ e_canvas_button (GtkWidget *widget, GdkEventButton *event) break; default: - g_assert_not_reached (); + g_return_val_if_reached(0); } return retval; diff --git a/widgets/misc/e-cursors.c b/widgets/misc/e-cursors.c index 07587cabb3..550b746ad0 100644 --- a/widgets/misc/e-cursors.c +++ b/widgets/misc/e-cursors.c @@ -72,9 +72,9 @@ create_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, gchar **x sscanf (xpm [0], "%d %d %d %d", &height, &width, &colors, &pix); - g_assert (height == 32); - g_assert (width == 32); - g_assert (colors <= 3); + g_return_if_fail (height == 32); + g_return_if_fail (width == 32); + g_return_if_fail (colors <= 3); transparent_color = ' '; black_color = '.'; @@ -134,7 +134,7 @@ e_cursors_init (void) } } - g_assert (i == E_CURSOR_NUM_CURSORS); + g_return_if_fail (i == E_CURSOR_NUM_CURSORS); } void diff --git a/widgets/misc/e-expander.c b/widgets/misc/e-expander.c index 938437c680..f54dc9fcff 100644 --- a/widgets/misc/e-expander.c +++ b/widgets/misc/e-expander.c @@ -989,8 +989,7 @@ e_expander_focus (GtkWidget *widget, } } - g_assert_not_reached (); - return FALSE; + g_return_val_if_reached(FALSE); } static void diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index 4b8d459911..8424c77651 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -113,7 +113,7 @@ update_clear_menuitem_sensitive (ESearchBar *search_bar) static void clear_button_state_changed (GtkWidget *clear_button, GtkStateType state, ESearchBar *search_bar) { - g_assert (clear_button != NULL && search_bar != NULL); + g_return_if_fail (clear_button != NULL && search_bar != NULL); update_clear_menuitem_sensitive (search_bar); } @@ -276,7 +276,7 @@ search_verb_cb (BonoboUIComponent *ui_component, esb = E_SEARCH_BAR (data); p = strrchr (verb_name, ':'); - g_assert (p != NULL); + g_return_if_fail (p != NULL); id = atoi (p + 1); diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c index c44876dab3..973f7343e5 100644 --- a/widgets/misc/e-selection-model.c +++ b/widgets/misc/e-selection-model.c @@ -439,7 +439,7 @@ e_selection_model_do_something (ESelectionModel *selection, } break; default: - g_assert_not_reached (); + g_return_if_reached(); break; } e_selection_model_change_cursor(selection, row, col); @@ -534,7 +534,7 @@ e_selection_model_select_as_key_press (ESelectionModel *selection, e_selection_model_select_single_row (selection, row); break; default: - g_assert_not_reached (); + g_return_if_reached(); break; } if (row != -1) { diff --git a/widgets/misc/e-spinner.c b/widgets/misc/e-spinner.c index 40e71d4bdf..1fcc63a54b 100644 --- a/widgets/misc/e-spinner.c +++ b/widgets/misc/e-spinner.c @@ -269,7 +269,10 @@ e_spinner_images_load (GdkScreen *screen, goto loser; } } - g_assert (icon_info != NULL); + if (icon_info == NULL) { + g_warning ("icon_info is NULL"); + goto loser; + } size = gtk_icon_info_get_base_size (icon_info); icon = gtk_icon_info_get_filename (icon_info); @@ -309,8 +312,7 @@ e_spinner_images_load (GdkScreen *screen, g_object_unref (icon_pixbuf); - if (list == NULL) goto loser; - g_assert (n > 0); + if (list == NULL || n <= 0) goto loser; if (size > requested_size) { @@ -332,10 +334,12 @@ e_spinner_images_load (GdkScreen *screen, for (l = list; l != NULL; l = l->next) { - g_assert (l->data != NULL); - images->animation_pixbufs[--n] = l->data; + if (l->data) + images->animation_pixbufs[--n] = l->data; + } + if (n != 0) { + g_warning ("n != 0 \n"); } - g_assert (n == 0); g_slist_free (list); @@ -645,14 +649,14 @@ e_spinner_expose (GtkWidget *widget, } /* Otherwise |images| will be NULL anyway */ - g_assert (images->n_animation_pixbufs > 0); + g_return_val_if_fail (images->n_animation_pixbufs > 0, FALSE); - g_assert (details->current_image >= 0 && - details->current_image < images->n_animation_pixbufs); + g_return_val_if_fail (details->current_image >= 0 && + details->current_image < images->n_animation_pixbufs, FALSE); pixbuf = images->animation_pixbufs[details->current_image]; - g_assert (pixbuf != NULL); + g_return_val_if_fail (pixbuf != NULL, FALSE); width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_height (pixbuf); diff --git a/widgets/misc/e-task-bar.c b/widgets/misc/e-task-bar.c index c80c4e16b3..197ab13a47 100644 --- a/widgets/misc/e-task-bar.c +++ b/widgets/misc/e-task-bar.c @@ -68,7 +68,7 @@ reduce_displayed_activities_per_component (ETaskBar *task_bar) int num_items; num_items = GPOINTER_TO_INT (hash_item); - g_assert (num_items <= MAX_ACTIVITIES_PER_COMPONENT); + g_return_if_fail (num_items <= MAX_ACTIVITIES_PER_COMPONENT); if (num_items == MAX_ACTIVITIES_PER_COMPONENT) { gtk_widget_hide (child->widget); diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index ab9bd4ea90..e0ff5149c1 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,26 @@ +2007-08-31 Srinivasa Ragavan <sragavan@novell.com> + + ** Move away from g_assert to g_return* critical warnings to debug + them better. + + * e-cell-text.c: (ect_edit_select_all), (_get_position): + * e-table-config.c: (configure_combo_box_add), + (configure_combo_box_set_active), + (update_sort_and_group_config_dialog): + * e-table-group.c: (e_table_group_add), (e_table_group_add_array), + (e_table_group_add_all), (e_table_group_remove), + (e_table_group_increment), (e_table_group_decrement), + (e_table_group_row_count), (e_table_group_set_focus), + (e_table_group_get_focus), (e_table_group_get_focus_column), + (e_table_group_get_printable), (e_table_group_compute_location), + (e_table_group_get_cell_geometry): + * e-table-header-utils.c: (e_table_header_compute_height), + (make_composite_pixmap), (e_table_header_draw_button): + * e-table-item.c: (eti_attach_cell_views), (eti_row_height_real), + (eti_add_table_model), (eti_add_selection_model), + (eti_header_structure_changed), (eti_add_header_model): + * e-tree-table-adapter.c: (generate_tree): + 2007-08-24 Milan Crha <mcrha@redhat.com> ** Fix for bug #239441 diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 8558ca6540..ec20d6bbf3 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -888,7 +888,7 @@ ect_get_bg_color(ECellView *ecell_view, int row) static void ect_edit_select_all (ECellTextView *text_view) { - g_assert (text_view->edit); + g_return_if_fail (text_view->edit); text_view->edit->selection_start = 0; text_view->edit->selection_end = strlen (text_view->edit->text); @@ -2327,7 +2327,9 @@ _get_position (ECellTextView *text_view, ETextEventProcessorCommand *command) default: return edit->selection_end; } - g_assert_not_reached (); + + g_return_val_if_reached(0); + return 0; /* Kill warning */ } diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index 8e5e36e6d9..dd92445a77 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -175,12 +175,12 @@ configure_combo_box_add (GtkComboBox *combo_box, const gchar *item, COLUMN_ITEM, item, COLUMN_VALUE, value, -1); index = g_object_get_data (G_OBJECT (combo_box), "index"); - g_assert (index != NULL); + g_return_if_fail (index != NULL); /* Add an entry to the tree model index. */ path = gtk_tree_model_get_path (model, &iter); reference = gtk_tree_row_reference_new (model, path); - g_assert (reference != NULL); + g_return_if_fail (reference != NULL); g_hash_table_insert (index, g_strdup (value), reference); gtk_tree_path_free (path); } @@ -211,7 +211,7 @@ configure_combo_box_set_active (GtkComboBox *combo_box, const gchar *value) GHashTable *index; index = g_object_get_data (G_OBJECT (combo_box), "index"); - g_assert (index != NULL); + g_return_if_fail (index != NULL); reference = g_hash_table_lookup (index, value); if (reference != NULL) { @@ -338,9 +338,9 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort) widgets [i].radio_ascending); if (is_sort) - g_assert (widgets [i].radio_ascending != config->group [i].radio_ascending); + g_return_if_fail (widgets [i].radio_ascending != config->group [i].radio_ascending); else - g_assert (widgets [i].radio_ascending != config->sort [i].radio_ascending); + g_return_if_fail (widgets [i].radio_ascending != config->sort [i].radio_ascending); gtk_toggle_button_set_active (t, 1); } diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c index a9cdcae468..ba37abed96 100644 --- a/widgets/table/e-table-group.c +++ b/widgets/table/e-table-group.c @@ -156,7 +156,7 @@ e_table_group_add (ETableGroup *etg, g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); - g_assert (ETG_CLASS (etg)->add != NULL); + g_return_if_fail (ETG_CLASS (etg)->add != NULL); ETG_CLASS (etg)->add (etg, row); } @@ -177,7 +177,7 @@ e_table_group_add_array (ETableGroup *etg, g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); - g_assert (ETG_CLASS (etg)->add_array != NULL); + g_return_if_fail (ETG_CLASS (etg)->add_array != NULL); ETG_CLASS (etg)->add_array (etg, array, count); } @@ -194,7 +194,7 @@ e_table_group_add_all (ETableGroup *etg) g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); - g_assert (ETG_CLASS (etg)->add_all != NULL); + g_return_if_fail (ETG_CLASS (etg)->add_all != NULL); ETG_CLASS (etg)->add_all (etg); } @@ -216,7 +216,7 @@ e_table_group_remove (ETableGroup *etg, g_return_val_if_fail (etg != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_GROUP (etg), FALSE); - g_assert (ETG_CLASS (etg)->remove != NULL); + g_return_val_if_fail (ETG_CLASS (etg)->remove != NULL, FALSE); return ETG_CLASS (etg)->remove (etg, row); } @@ -238,7 +238,7 @@ e_table_group_increment (ETableGroup *etg, g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); - g_assert (ETG_CLASS (etg)->increment != NULL); + g_return_if_fail (ETG_CLASS (etg)->increment != NULL); ETG_CLASS (etg)->increment (etg, position, amount); } @@ -260,7 +260,7 @@ e_table_group_decrement (ETableGroup *etg, g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); - g_assert (ETG_CLASS (etg)->decrement != NULL); + g_return_if_fail (ETG_CLASS (etg)->decrement != NULL); ETG_CLASS (etg)->decrement (etg, position, amount); } @@ -278,7 +278,7 @@ e_table_group_row_count (ETableGroup *etg) g_return_val_if_fail (etg != NULL, 0); g_return_val_if_fail (E_IS_TABLE_GROUP (etg), -1); - g_assert (ETG_CLASS (etg)->row_count != NULL); + g_return_val_if_fail (ETG_CLASS (etg)->row_count != NULL, -1); return ETG_CLASS (etg)->row_count (etg); } @@ -299,7 +299,7 @@ e_table_group_set_focus (ETableGroup *etg, g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); - g_assert (ETG_CLASS (etg)->set_focus != NULL); + g_return_if_fail (ETG_CLASS (etg)->set_focus != NULL); ETG_CLASS (etg)->set_focus (etg, direction, view_col); } @@ -317,7 +317,7 @@ e_table_group_get_focus (ETableGroup *etg) g_return_val_if_fail (etg != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_GROUP (etg), FALSE); - g_assert (ETG_CLASS (etg)->get_focus != NULL); + g_return_val_if_fail (ETG_CLASS (etg)->get_focus != NULL, FALSE); return ETG_CLASS (etg)->get_focus (etg); } @@ -335,7 +335,7 @@ e_table_group_get_focus_column (ETableGroup *etg) g_return_val_if_fail (etg != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_GROUP (etg), -1); - g_assert (ETG_CLASS (etg)->get_focus_column != NULL); + g_return_val_if_fail (ETG_CLASS (etg)->get_focus_column != NULL, -1); return ETG_CLASS (etg)->get_focus_column (etg); } @@ -354,7 +354,7 @@ e_table_group_get_printable (ETableGroup *etg) g_return_val_if_fail (etg != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_GROUP (etg), NULL); - g_assert (ETG_CLASS (etg)->get_printable != NULL); + g_return_val_if_fail (ETG_CLASS (etg)->get_printable != NULL, NULL); return ETG_CLASS (etg)->get_printable (etg); } @@ -378,7 +378,7 @@ e_table_group_compute_location (ETableGroup *etg, int *x, int *y, int *row, int g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); - g_assert (ETG_CLASS (etg)->compute_location != NULL); + g_return_if_fail (ETG_CLASS (etg)->compute_location != NULL); ETG_CLASS (etg)->compute_location (etg, x, y, row, col); } @@ -408,7 +408,7 @@ e_table_group_get_cell_geometry (ETableGroup *etg, g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); - g_assert (ETG_CLASS (etg)->get_cell_geometry != NULL); + g_return_if_fail (ETG_CLASS (etg)->get_cell_geometry != NULL); ETG_CLASS (etg)->get_cell_geometry (etg, row, col, x, y, width, height); } diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 1bbb60eb07..807713d170 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -86,7 +86,7 @@ e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget) pango_layout_get_pixel_size (layout, NULL, &height); if (ecol->is_pixbuf) { - g_assert (ecol->pixbuf != NULL); + g_return_val_if_fail (ecol->pixbuf != NULL, -1); height = MAX (height, gdk_pixbuf_get_height (ecol->pixbuf)); } @@ -122,7 +122,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, pwidth = gdk_pixbuf_get_width (pixbuf); pheight = gdk_pixbuf_get_height (pixbuf); - g_assert (width <= pwidth && height <= pheight); + g_return_val_if_fail (width <= pwidth && height <= pheight, NULL); color = ((bg->red & 0xff00) << 8) | (bg->green & 0xff00) | ((bg->blue & 0xff00) >> 8); @@ -404,8 +404,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, } default: - g_assert_not_reached (); - return; + g_return_if_reached(); } if (inner_width < 1) @@ -420,7 +419,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, int xpos; GdkPixmap *pixmap; - g_assert (ecol->pixbuf != NULL); + g_return_if_fail (ecol->pixbuf != NULL); pwidth = gdk_pixbuf_get_width (ecol->pixbuf); pheight = gdk_pixbuf_get_height (ecol->pixbuf); diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 457f1ad778..adabf7c90f 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -354,8 +354,8 @@ eti_attach_cell_views (ETableItem *eti) { int i; - g_assert (eti->header); - g_assert (eti->table_model); + g_return_if_fail (eti->header); + g_return_if_fail (eti->table_model); /* this is just c&p from model pre change, but it fixes things */ eti_cancel_drag_due_to_model_change (eti); @@ -616,7 +616,7 @@ eti_row_height_real (ETableItem *eti, int row) int col; int h, max_h; - g_assert (cols == 0 || eti->cell_views); + g_return_val_if_fail (cols == 0 || eti->cell_views, 0); max_h = 0; @@ -1257,7 +1257,7 @@ e_table_item_redraw_row (ETableItem *eti, static void eti_add_table_model (ETableItem *eti, ETableModel *table_model) { - g_assert (eti->table_model == NULL); + g_return_if_fail (eti->table_model == NULL); eti->table_model = table_model; g_object_ref (eti->table_model); @@ -1310,7 +1310,7 @@ eti_add_table_model (ETableItem *eti, ETableModel *table_model) static void eti_add_selection_model (ETableItem *eti, ESelectionModel *selection) { - g_assert (eti->selection == NULL); + g_return_if_fail (eti->selection == NULL); eti->selection = selection; g_object_ref (eti->selection); @@ -1354,7 +1354,6 @@ eti_header_structure_changed (ETableHeader *eth, ETableItem *eti) * There should be at least one column * BUT: then you can't remove all columns from a header and add new ones. */ - /*g_assert (eti->cols != 0);*/ if (eti->cell_views){ eti_unrealize_cell_views (eti); @@ -1388,7 +1387,7 @@ eti_request_column_width (ETableHeader *eth, int col, ETableItem *eti) static void eti_add_header_model (ETableItem *eti, ETableHeader *header) { - g_assert (eti->header == NULL); + g_return_if_fail (eti->header == NULL); eti->header = header; g_object_ref (header); diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index 0cd84650e5..93c73e1d1e 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -362,7 +362,7 @@ generate_tree(ETreeTableAdapter *etta, ETreePath path) e_table_model_pre_change(E_TABLE_MODEL(etta)); - g_assert(e_tree_model_node_is_root(etta->priv->source, path)); + g_return_if_fail (e_tree_model_node_is_root(etta->priv->source, path)); if (etta->priv->root) kill_gnode(etta->priv->root, etta); diff --git a/widgets/text/e-completion-view.c b/widgets/text/e-completion-view.c index f08f2ecbc5..bbf7d4168f 100644 --- a/widgets/text/e-completion-view.c +++ b/widgets/text/e-completion-view.c @@ -409,7 +409,7 @@ e_completion_view_set_cursor_row (ECompletionView *cv, gint r) ++iteration_count; } - g_assert_not_reached (); + g_return_if_reached(); } static void diff --git a/widgets/text/e-table-text-model.c b/widgets/text/e-table-text-model.c index e0b8b6bae2..2c7e91fff9 100644 --- a/widgets/text/e-table-text-model.c +++ b/widgets/text/e-table-text-model.c @@ -85,7 +85,7 @@ e_table_text_model_dispose (GObject *object) model = E_TABLE_TEXT_MODEL (object); if (model->model) - g_assert (GTK_IS_OBJECT (model->model)); + g_return_if_fail (GTK_IS_OBJECT (model->model)); if (model->cell_changed_signal_id) g_signal_handler_disconnect (model->model, diff --git a/widgets/text/e-text-model-uri.c b/widgets/text/e-text-model-uri.c index 9bf0af7805..185d109821 100644 --- a/widgets/text/e-text-model-uri.c +++ b/widgets/text/e-text-model-uri.c @@ -229,7 +229,7 @@ objectify_idle_cb (gpointer ptr) { ETextModelURI *model_uri = E_TEXT_MODEL_URI (ptr); - g_assert (model_uri->objectify_idle); + g_return_val_if_fail (model_uri->objectify_idle, FALSE); objectify_uris (model_uri); model_uri->objectify_idle = 0; |