fix another critical warning

This commit is contained in:
Eric House 2019-01-27 09:12:58 -08:00
parent 71fb14bce1
commit a2aafc8b93

View file

@ -1904,7 +1904,8 @@ gtk_util_yOffsetChange( XW_UtilCtxt* uc, XP_U16 maxOffset,
XP_U16 newOffset )
{
GtkGameGlobals* globals = (GtkGameGlobals*)uc->closure;
if ( !!globals->adjustment ) {
/* adjustment is invalid when gtk's shutting down; ignore */
if ( !!globals->adjustment && GTK_IS_ADJUSTMENT(globals->adjustment) ) {
gint nRows = globals->cGlobals.gi->boardSize;
gtk_adjustment_set_page_size(globals->adjustment, nRows - maxOffset);
gtk_adjustment_set_value(globals->adjustment, newOffset);