
345 So.2d 1093 (1977)
Arthur Lee COLEMAN, Appellant,
v.
STATE of Florida, Appellee.
No. 76-797.
District Court of Appeal of Florida, Fourth District.
May 6, 1977.
Rehearing Denied June 6, 1977.
*1094 Richard E. Mandell, of Law Offices of Michael Sigman, Orlando, for appellant.
Robert L. Shevin, Atty. Gen., Tallahassee, and Paul H. Zacks, Asst. Atty. Gen., West Palm Beach, for appellee.
ALDERMAN, Judge.
This is a criminal appeal in which the defendant seeks reversal of his conviction for violation of Section 790.23, Florida Statutes.[1] The primary issue is whether self-defense is a viable defense to the offense of possession of a firearm by a convicted felon. We hold that it is not and affirm.
The State proved that the defendant was a convicted felon and that he had possession of a firearm. In response, the defendant sought to establish that: he had been awakened by neighbors at his home and had been told that his place of business was being broken into; he left his home armed with a pistol; when he arrived at his place of business he encountered a burglar who attacked him with a crowbar; he shot the burglar in self-defense, and when the police arrived he voluntarily surrendered the pistol to them. The trial court denied the proffer and would not allow the defendant to show that he shot the burglar in self-defense.
The trial court's decision was based on Dardy v. State, 324 So.2d 178 (Fla. 1st DCA 1975), wherein the appellate court said: "Self defense is not a viable defense to the offense of possession of a firearm by a convicted felon." The defendant correctly points out that this statement in Dardy is dicta. The issue, however, is squarely presented to us in this appeal and we hold that self-defense is not a viable defense to the offense of possession of a firearm by a convicted felon.
Evidence justifying the defendant's use of the firearm would be irrelevant and immaterial. The defendant is not charged with shooting the burglar; he is charged, as a convicted felon, with the unlawful possession of a firearm. The statute makes it a crime for a convicted felon to possess a firearm. There is no exception made for the convicted felon who believes he may need a firearm for self-defense. The defendant violated the statute by being in possession of a firearm. His subsequent use of the firearm in self-defense does not excuse or justify his initial violation of the statute. We hold that the trial court correctly disallowed the proffered testimony.
We have also considered the other point raised by the defendant on this appeal and find it to be without merit.
AFFIRMED.
DOWNEY, J., and PARHAM, HARRY C., Associate Judge, concur.
NOTES
[1]  Section 790.23, Florida Statutes (1975), provides:

(1) It is unlawful for any person who has been convicted of a felony in the courts of this state or of a crime against the United States which is designated as a felony or convicted of an offense in any other state, territory, or country punishable by imprisonment for a term exceeding 1 year to own or to have in his care, custody, possession, or control any firearm or to carry a concealed weapon, including all tear gas guns and chemical weapons or devices.
(2) This section shall not apply to a person convicted of a felony whose civil rights have been restored.
(3) Any person convicted of violating this section is guilty of a felony of the second degree, punishable as provided in § 775.082, § 775.083, or § 775.084.
