From 9b97eb282aabfacf5175f5e0974fada07632f2e8 Mon Sep 17 00:00:00 2001 From: oy Date: Tue, 5 Apr 2011 20:06:41 +0200 Subject: prevent that you can add votes with an empty description --- src/game/client/components/menus_ingame.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/client/components/menus_ingame.cpp') diff --git a/src/game/client/components/menus_ingame.cpp b/src/game/client/components/menus_ingame.cpp index cdeae9a8..fbde9a0b 100644 --- a/src/game/client/components/menus_ingame.cpp +++ b/src/game/client/components/menus_ingame.cpp @@ -550,7 +550,8 @@ void CMenus::RenderServerControl(CUIRect MainView) Bottom.VSplitRight(120.0f, &Bottom, &Button); static int s_AddVoteButton = 0; if(DoButton_Menu(&s_AddVoteButton, Localize("Add"), 0, &Button)) - m_pClient->m_pVoting->AddvoteOption(s_aVoteDescription, s_aVoteCommand); + if(s_aVoteDescription[0] != 0 && s_aVoteCommand[0] != 0) + m_pClient->m_pVoting->AddvoteOption(s_aVoteDescription, s_aVoteCommand); Bottom.VSplitLeft(5.0f, 0, &Bottom); Bottom.VSplitLeft(250.0f, &Button, &Bottom); -- cgit 1.4.1