Fixed: ah:html_submit_form without caller object

webig-fixes
Nimetu 5 years ago
parent 8f59a71e3c
commit 7856e93723

@ -1116,8 +1116,8 @@ class CHandlerHTMLSubmitForm : public IActionHandler
return; return;
} }
sint32 x = pCaller->getEventX(); sint32 x = pCaller ? pCaller->getEventX() : 0;
sint32 y = pCaller->getEventY(); sint32 y = pCaller ? pCaller->getEventY() : 0;
CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId(container); CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId(container);
{ {
@ -1127,6 +1127,10 @@ class CHandlerHTMLSubmitForm : public IActionHandler
{ {
groupHtml->submitForm(button, x, y); groupHtml->submitForm(button, x, y);
} }
else
{
nlwarning("CGroupHTML with id '%s' not found.", container.c_str());
}
} }
} }
}; };

Loading…
Cancel
Save