* src/hildon2/modest-msg-view-window.c (view_msg_cb): fix a crash that
happened when we used view_msg_cb and there was no row_reference as
parameter (fixes NB#129121).
/* Update the row reference */
if (priv->row_reference != NULL) {
gtk_tree_row_reference_free (priv->row_reference);
/* Update the row reference */
if (priv->row_reference != NULL) {
gtk_tree_row_reference_free (priv->row_reference);
- priv->row_reference = gtk_tree_row_reference_copy (row_reference);
+ priv->row_reference = row_reference?gtk_tree_row_reference_copy (row_reference):NULL;
if (priv->next_row_reference != NULL) {
gtk_tree_row_reference_free (priv->next_row_reference);
}
if (priv->next_row_reference != NULL) {
gtk_tree_row_reference_free (priv->next_row_reference);
}
- priv->next_row_reference = gtk_tree_row_reference_copy (priv->row_reference);
- select_next_valid_row (priv->header_model, &(priv->next_row_reference), TRUE, priv->is_outbox);
+ if (row_reference) {
+ priv->next_row_reference = gtk_tree_row_reference_copy (priv->row_reference);
+ select_next_valid_row (priv->header_model, &(priv->next_row_reference), TRUE, priv->is_outbox);
+ } else {
+ priv->next_row_reference = NULL;
+ }
}
/* Mark header as read */
}
/* Mark header as read */