handle null path better (should never happen ... chasing down unrelated memory trashing...)
This commit is contained in:
parent
65661f4109
commit
b92d2b00e7
17
config.c
17
config.c
|
@ -119,8 +119,13 @@ Rect r;
|
||||||
r = (**CtrlHand).ctlRect;
|
r = (**CtrlHand).ctlRect;
|
||||||
EraseRect(&r);
|
EraseRect(&r);
|
||||||
|
|
||||||
SetCtlValue(gstr->length, CtrlHand);
|
if (data) {
|
||||||
SetCtlTitle(2 + (Pointer)gstr, (Handle)CtrlHand);
|
SetCtlValue(gstr->length, CtrlHand);
|
||||||
|
SetCtlTitle(gstr->text, (Handle)CtrlHand);
|
||||||
|
} else {
|
||||||
|
SetCtlValue(0, CtrlHand);
|
||||||
|
SetCtlTitle("", (Handle)CtrlHand);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoConfig(Word MyID)
|
void DoConfig(Word MyID)
|
||||||
|
@ -143,8 +148,12 @@ Handle newPath = NULL;
|
||||||
|
|
||||||
SetPort(win);
|
SetPort(win);
|
||||||
// set the current path text...
|
// set the current path text...
|
||||||
HLock(rPath);
|
if (rPath) {
|
||||||
SetText(win, CtrlPath, *rPath);
|
HLock(rPath);
|
||||||
|
SetText(win, CtrlPath, *rPath);
|
||||||
|
} else {
|
||||||
|
SetText(win, CtrlPath, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
for (ok = true; ok;)
|
for (ok = true; ok;)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue