Re #307 Fixed GCC warning about a possible crash when calling help menu when no keyboard shortcut is defined

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4699 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 7b555242b91228ecefcb7608115272d515f0fa49
Former-commit-id: b50e9d0d75457d763c7a639c7c06feccd0f34573
This commit is contained in:
pouillot 2012-04-14 09:54:25 +00:00
parent 671eec41f7
commit 2df69cbda5

View file

@ -92,11 +92,12 @@ GfuiHelpScreen(void *targetScreen, void *returnScreen)
tGfuiScreen *pscrTgt = (tGfuiScreen*)targetScreen;
tGfuiKey *curKey = pscrTgt->userKeys;
do {
while (curKey)
{
curKey = curKey->next;
// Decide if this key goes on the left of right column.
bool bLeft;
if (curKey) {
curKey = curKey->next;
switch(curKey->key) {
case GFUIK_BACKSPACE:
case GFUIK_F1:
@ -130,7 +131,6 @@ GfuiHelpScreen(void *targetScreen, void *returnScreen)
bLeft = curKey->modifier != GFUIM_NONE;
break;
}
}
// Determine control coordinates, whether left or right column.
int x, y;
@ -157,7 +157,7 @@ GfuiHelpScreen(void *targetScreen, void *returnScreen)
if (curKey == pscrTgt->userKeys)
curKey = (tGfuiKey*)NULL;
} while (curKey);
}
// Create Back button.