netserver/HWProto.hs
changeset 1442 ef9785d0b392
parent 1412 20746999bc4a
child 1452 8505cbfd9a21
--- a/netserver/HWProto.hs	Fri Oct 31 14:30:08 2008 +0000
+++ b/netserver/HWProto.hs	Fri Oct 31 14:35:59 2008 +0000
@@ -219,7 +219,10 @@
 	if not $ isMaster client then
 		(noChangeClients, noChangeRooms, answerNotMaster)
 	else
-		(noChangeClients, modifyRoom $ modifyTeam clRoom team{teamcolor = newColor}, answerTeamColor teamName newColor)
+		if noSuchTeam then
+			(noChangeClients, noChangeRooms, answerBadParam)
+		else
+			(noChangeClients, modifyRoom $ modifyTeam clRoom team{teamcolor = newColor}, answerTeamColor teamName newColor)
 	where
 		noSuchTeam = isNothing findTeam
 		team = fromJust findTeam