mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 03:32:48 +00:00
Avoid std::bad_function_call if we don't specify an onreceive callback for the WebSocket
This commit is contained in:
parent
c2f24656d7
commit
5c30315611
@ -107,6 +107,8 @@ int WebSocket_new(lua_State* L)
|
||||
});
|
||||
}
|
||||
else {
|
||||
// Set a default handler to avoid a std::bad_function_call exception
|
||||
ws->setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) { });
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user