Make sure variables are defined before anything else.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5570 4a71c877-e1ca-e34f-864e-861f7616d084
master
Freddie Witherden 2008-07-16 19:14:35 +00:00
parent 3fb1c3e234
commit 2f254ade34
1 changed files with 3 additions and 2 deletions

View File

@ -608,6 +608,8 @@ void widgetDisableImpl(widget *self)
void widgetFocusImpl(widget *self)
{
eventMisc evt;
// Check that we are not currently focused
if (self->hasFocus)
{
@ -638,7 +640,6 @@ void widgetFocusImpl(widget *self)
// Fire our on-focus callbacks
// FIXME: We need to set the timestamp of the event
eventMisc evt;
evt.event.type = EVT_FOCUS;
widgetFireCallbacks(self, (event *) &evt);
}
@ -646,6 +647,7 @@ void widgetFocusImpl(widget *self)
void widgetBlurImpl(widget *self)
{
widget *current;
eventMisc evt;
// Make sure we have focus
if (!self->hasFocus)
@ -665,7 +667,6 @@ void widgetBlurImpl(widget *self)
// Fire off the on-blur callbacks
// FIXME: We need to set the timestamp of the event
eventMisc evt;
evt.event.type = EVT_BLUR;
widgetFireCallbacks(self, (event *) &evt);
}