[Sphere-axis-commits] CVS: Axis ColorSelectionDlg.cpp,1.9,1.10
Brought to you by:
pesterle
From: Philip E. <pes...@us...> - 2002-05-10 19:22:18
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv20925 Modified Files: ColorSelectionDlg.cpp Log Message: Fixed a crash bug that occurs when the default client is in a directory that doesn't contain the mul files. Index: ColorSelectionDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/ColorSelectionDlg.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** ColorSelectionDlg.cpp 5 May 2002 16:21:32 -0000 1.9 --- ColorSelectionDlg.cpp 10 May 2002 19:22:11 -0000 1.10 *************** *** 173,177 **** --- 173,180 ---- } else + { AfxMessageBox("Hues were not successfully loaded at startup, so the palette is not available", MB_OK); + m_sShade.EnableWindow(FALSE); + } BITMAPINFO bmi; *************** *** 243,246 **** --- 246,251 ---- int groupIndex = colorIndex / 8; int hueIndex = colorIndex % 8; + if ( Main->m_aHueGroups.GetUpperBound() < groupIndex ) + return; CHueGroup * pGroup = (CHueGroup *) Main->m_aHueGroups.GetAt(groupIndex); if ( pGroup != NULL ) *************** *** 304,307 **** --- 309,314 ---- int groupIndex = colorIndex / 8; int hueIndex = colorIndex % 8; + if ( Main->m_aHueGroups.GetUpperBound() < groupIndex ) + return; CHueGroup * pGroup = (CHueGroup *) Main->m_aHueGroups.GetAt(groupIndex); if ( pGroup == NULL ) |