Skip to content

Commit

Permalink
Bug 799470 - Crash when clicking on Schedule Transaction Editor
Browse files Browse the repository at this point in the history
It's not the root cause of the crash, but the extra sanity check
will prevent it anyway
  • Loading branch information
gjanssens committed Dec 11, 2024
1 parent 3bfec43 commit 3be430f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gnucash/gnome/gnc-plugin-page-sx-list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,11 @@ gnc_plugin_page_sx_list_create_widget (GncPluginPage *plugin_page)

/* Set number of months from preference, default 12 */
auto num_months = gnc_prefs_get_int (GNC_PREFS_GROUP_SXED, GNC_PREF_NUM_OF_MONTHS);
if (num_months == 0)
{
PWARN ("Got invalid value '0' for number of months to display. This suggests a gsettings configuration issue. Continuing with a default value of 12 instead.");
num_months = 12;
}
gnc_dense_cal_set_num_months (priv->gdcal, num_months);

gtk_container_add (GTK_CONTAINER(swin), GTK_WIDGET(priv->gdcal));
Expand Down

0 comments on commit 3be430f

Please sign in to comment.