You would be wrong. Read Cox v. Louisiana, 379 U.S. 559 (1965).
A similar law was held not to violate the First Amendment. The conviction was only reversed because he asked law enforcement if he could protest at the location in question and they told him yes, the location didn't trigger the statue. Then they arrested him. Reversed due to entrapment, not on First Amendment grounds.
Held:
1. The statute is narrowly drawn, furthers the State's legitimate interest of protecting its judicial system from pressures which picketing near a courthouse might create, is a valid regulation of conduct, as distinguished from pure speech, and does not infringe rights of free speech and assembly. Pp. 383 U. S. 562-564.
2. Even assuming the applicability of a "clear and present danger" test, there is no constitutional objection to applying the statute to conduct of the sort engaged in by the demonstrators. Pp. 383 U. S. 565-566.
3. The evidence of intent to obstruct justice or influence any judicial official required by the statute was constitutionally sufficient. Pp. 383 U. S. 566-567.
4. Appellant was, in effect, advised by the city's highest police officials that a demonstration at the place where it was held was not "near" the courthouse, and to permit him to be convicted for exercising the privilege they told him was available would be to allow a type of entrapment violative of the Due Process Clause. Raley v. Ohio, 360 U. S. 423, followed. Pp. 383 U. S. 569-571.