Don't allow sending empty messages

This commit is contained in:
simon.kagstrom 2010-08-15 11:29:22 +00:00
parent 9b4b1dfe94
commit 6b8bdfce22

View File

@ -647,7 +647,10 @@ public:
virtual void stringCallback(const char *str) virtual void stringCallback(const char *str)
{ {
*out = (const char *)xstrdup(str); *out = (const char *)xstrdup(str);
Gui::gui->status_bar->queueMessage("Network message sent!"); if (strlen(str) > 0)
Gui::gui->status_bar->queueMessage("Network message sent!");
else
Gui::gui->status_bar->queueMessage("Not sending empty message");
/* Remove thyself! */ /* Remove thyself! */
delete this; delete this;
} }