Fixed Glib-CRITICAL g_date problem for weekly transactions w/o any weekdays selected.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4908 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Joshua Sled 2001-07-06 08:50:22 +00:00
parent 1e36965ded
commit 999211fb3c

View File

@ -775,14 +775,18 @@ mark_calendar( GtkCalendar *cal, FreqSpec *fs )
gtk_calendar_select_day( cal, 0 );
xaccFreqSpecGetNextInstance( fs, gdNow, gdNext );
g_date_to_struct_tm( gdNext, tmpTm );
if ( g_date_valid( gdNext ) ) {
g_date_to_struct_tm( gdNext, tmpTm );
} else {
tmpTm->tm_mon = -1;
}
while ( tmpTm->tm_mon == month && g_date_valid(gdNext) ) {
gtk_calendar_mark_day( cal, tmpTm->tm_mday );
*gdNow = *gdNext;
xaccFreqSpecGetNextInstance( fs, gdNow, gdNext );
if ( g_date_valid( gdNow ) ) {
g_date_to_struct_tm( gdNext, tmpTm );
}
gtk_calendar_mark_day( cal, tmpTm->tm_mday );
*gdNow = *gdNext;
xaccFreqSpecGetNextInstance( fs, gdNow, gdNext );
if ( g_date_valid( gdNow ) ) {
g_date_to_struct_tm( gdNext, tmpTm );
}
}
gtk_calendar_thaw( cal );