fix core dump

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@151 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1997-11-26 21:35:43 +00:00
parent 4d3bff8b17
commit a5738d75bc

View File

@ -189,10 +189,15 @@ static void selectCB (Widget w, XtPointer cd, XtPointer cb )
PopBox *ab = (PopBox *) cd;
XmComboBoxSelectionCallbackStruct *selection =
(XmComboBoxSelectionCallbackStruct *) cb;
char * choice;
char * choice = 0x0;
choice = XmCvtXmStringToCT (selection->value);
if (0x0 == choice) choice = "";
/* check the reason, because the unslect callback
* doesn't even have a value field! */
if ( (XmCR_SINGLE_SELECT == selection->reason) ||
(XmCR_SINGLE_SELECT == selection->reason) ) {
choice = XmCvtXmStringToCT (selection->value);
}
if (!choice) choice = "";
XbaeMatrixSetCell (ab->reg, ab->currow, ab->curcol, choice);