about summary refs log tree commit diff
path: root/src/game/client/components
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-04-05 20:06:41 +0200
committeroy <Tom_Adams@web.de>2011-04-05 20:06:41 +0200
commit9b97eb282aabfacf5175f5e0974fada07632f2e8 (patch)
tree60a3c56452e46b281dfa5428698b8a81047578ee /src/game/client/components
parent923153ca700942eb52e7acb70b94785774dbbab2 (diff)
downloadzcatch-9b97eb282aabfacf5175f5e0974fada07632f2e8.tar.gz
zcatch-9b97eb282aabfacf5175f5e0974fada07632f2e8.zip
prevent that you can add votes with an empty description
Diffstat (limited to 'src/game/client/components')
-rw-r--r--src/game/client/components/menus_ingame.cpp3
1 files changed, 2 insertions, 1 deletions
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);