[Fix] Long standing segfault when using 'enter' on a button with no trigger.

This commit is contained in:
Allanis 2013-03-22 20:19:45 +00:00
parent 8a1e7133c6
commit f45ab67dcc

View File

@ -1233,7 +1233,11 @@ static void toolkit_triggerFocus(void) {
switch(wgt->type) { switch(wgt->type) {
case WIDGET_BUTTON: case WIDGET_BUTTON:
(*wgt->dat.btn.fptr)(wgt->name); if(wgt->dat.btn.fptr)(*wgt->dat.btn.fptr)(wgt->name);
else DEBUG("Toolkit: Button '%s' of Window '%s'"
"Doesn't have a function trigger",
wgt->name, wdw->name);
break;
default: default:
break; break;
} }