On run function if node is running.

This commit is contained in:
Nicolás Ortega Froysa 2017-09-21 10:28:11 +02:00
parent 1b24fb56b4
commit 43772c6181
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF

View File

@ -62,6 +62,8 @@ int NeoComm_join_channel(const char *channel_name) {
} }
void NeoComm_leave_channel(const char *channel_name) { void NeoComm_leave_channel(const char *channel_name) {
if(not node.isRunning())
return;
const std::string s_chan_name(channel_name); const std::string s_chan_name(channel_name);
if(channels.find(s_chan_name) == channels.end()) if(channels.find(s_chan_name) == channels.end())
return; return;