Original Post
I have no idea why I'm getting a runtime error here
void FocusHandler::requestFocus( Widget *widget )
{
mToBeFocused = widget; // This line
} Access violation writing location 0x00000004.
mToBeFocused = widget;
00431063 mov eax,dword ptr [this]
00431066 mov ecx,dword ptr [widget]
00431069 mov dword ptr [eax+4],ecx // Right Here
} This is how I'm calling it:
void Gui::setTopWidget( Widget *widget )
{
if( mTop == NULL )
mTop = widget;
mFocusHandler->requestFocus( widget );
mFocusHandler->applyChanges();
}
Thanks, Ryan