engine-native icon indicating copy to clipboard operation
engine-native copied to clipboard

when SIOClient::fireEvent the second time,crash.

Open peter4431 opened this issue 9 years ago • 0 comments

void SIOClient::fireEvent(const std::string& eventName, const std::string& data)
{
    CCLOGINFO("SIOClient::fireEvent called with event name: %s and data: %s", eventName.c_str(), data.c_str());

    _delegate->fireEventToScript(this, eventName, data);


    //if(_eventRegistry[eventName]) need to change
    if(_eventRegistry.find(eventName) != _eventRegistry.end())
    {
        SIOEvent e = _eventRegistry[eventName];

        e(this, data);

        return;
    }

    CCLOGINFO("SIOClient::fireEvent no native event with name %s found", eventName.c_str());
}

peter4431 avatar Jul 11 '16 11:07 peter4431