
48 Cal.Rptr.3d 378 (2006)
142 Cal.App.4th 923
The PEOPLE, Plaintiff and Respondent,
v.
Curtis Edward SMITH, Defendant and Appellant.
No. E037036.
Court of Appeal of California, Fourth District, Division Two.
August 18, 2006.
*379 Carmela F. Simoncini, San Diego, under appointment by the Court of Appeal, for Defendant and Appellant.
*380 Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Gary W. Schons, Senior Assistant Attorney General, Gil Gonzalez, Supervising Deputy Attorney General, and Warren Robinson and Lynne McGinnis, Deputy Attorneys General, for Plaintiff and Respondent.
Certified for Partial Publication.[*]

OPINION
HOLLENHORST, Acting P.J.
On January 31, 2001, an information was filed charging defendant Curtis Edward Smith with inflicting corporal injury upon a spouse (Pen.Code, § 273.5, subd. (a),[1] counts 1 and 7), attempted premeditated murder (§§ 664/187; count 2), kidnapping (§ 207, subd. (a); count 3), assault with a deadly weapon (§ 245, subd. (a)(1); count 4), making criminal threats (§ 422; count 5), and residential burglary (§ 459; count 6). It was further alleged in counts 2, 3, 4, and 7 that defendant personally used a knife as a deadly weapon (§§ 12022, subd. (b)(1) & 1192.7, subd. (c)(24)) and that he committed the offenses while released from custody pending the disposition of another felony offense (§ 12022.1) As to counts 2, 4, and 7, the information alleged that defendant personally inflicted great bodily injury (§§ 12022.7, subd. (d) & 1192.7, subd. (c)(8)). Finally, the information alleged a "Three Strikes" law prior conviction (§§ 667, subds.(c) & (e)(1) & 1170.12, subd. (c)(1).)
Defendant entered guilty pleas to the charges against him; however, we reversed his convictions and remanded the case to the trial court.
Following a jury trial in 2004, defendant was found guilty of all charges against him. The jury further found the allegations attached to those counts to be true, except the allegation that defendant used a deadly weapon in the commission of the attempted murder, as to which the jury could not reach a verdict and the court therefore declared a mistrial. Later, the jury found the allegation of the prior conviction to be true.
On November 19, 2004, the court sentenced defendant to state prison for a total indeterminate sentence of 34 years to life.

FACTS
Defendant and Geraldine Butler were married in 1995. In 2000, they were living in a two-story house on West Chapparal in Blythe. The marriage was troubled and Geraldine had consulted a lawyer about a divorce.
Between 3:00 and 4:00 a.m. on October 2, 2000, defendant woke up Geraldine. He ordered her out of bed and then punched her in the chest. He took Geraldine downstairs and had her look at what he claimed was red hair on the kitchen counter. Not seeing any red hair, she told defendant that he was crazy and went back upstairs. Geraldine did not call the police that night because defendant told her that if she called the police, she would be dead before they arrived.
The next morning, Geraldine went to the police department. The police photographed bruises to her arm and leg that defendant had caused. Defendant was arrested and taken to jail. He was later released on bail. After defendant was arrested, Geraldine began living with her sister.
Geraldine obtained a restraining order against defendant, as well as an order removing him from the home on Chaparral, granting sole possession of the home to Geraldine. While in court prior to his *381 release from custody, defendant was served with both those orders.
On October 6, 2000, defendant attempted suicide by driving his jeep into a river. According to his note, he accused Geraldine of homosexuality. Defendant spent three days in a mental institution.
On October 10, 2000, Geraldine decided to return to her home instead of going to her sister's home. Geraldine picked up her mail and found a letter from defendant that accused her of being a homosexual. She called her sister and read the letter to her. After the call ended, defendant entered the home by throwing a propane canister through the sliding glass door. Geraldine started to run for the front door, but defendant grabbed her by the back of her hair and started choking her. The couple ended up on the floor with defendant continuing to choke her. While he was on top of her, he got a butcher knife from a drawer, held it to her throat, and threatened to kill her by slitting her throat.
The phone rang, and defendant became angry. He hit and kicked Geraldine, forcing her upstairs to the master bedroom where he pushed her into the bathroom. After the phone rang again, defendant forced Geraldine downstairs and to the garage. He kicked her and bit her arm. Defendant grabbed her car keys. Inside the car, defendant was unable to open the garage door because the code for the opener had been changed. Instead, he accelerated the car and backed it through the closed garage door by forcing it outward. As defendant was driving, Geraldine opened her door, and during a struggle, she was ejected from the car.
Defendant stopped the car, got out, and struck Geraldine several times in the face with his fists. He banged her head against the curb five or six times. Defendant said he was going to kill her. The blood flowing from Geraldine's head left a large pool. She lost consciousness.
Two or three men approached the couple and yelled at defendant, forcing him to stop. He got into his car and drove off. During his departure, defendant hit a parked tractor-trailer and injured his head. When the police arrived and asked what happened, defendant said, "I just killed my wife."
A police officer described Geraldine's injury as "very heinous looking' and, at first, the officer believed she was dead. The officer personally knew Geraldine, but did not recognize her because her face was so swollen and disfigured. She was initially hospitalized in the intensive care unit for a few days and then kept in the hospital for two more days. She suffered a contusion to her heart, and a concussion, among other injuries. At the time of trial in 2004, she still experienced headaches due to the attack.
Defendant testified that he did not assault Geraldine on October 2, 2000, although he admitted arguing with her. After being served with a restraining order in the jail, defendant did not return to his home.
After being released from the mental institution following his suicide attempt, defendant had practically no possessions other than the clothes he was wearing and his wallet, which contained a small amount of money. On the night of October 10, 2000, defendant, having no place to stay, went to the storage shed at the home on Chapparal with the intent of spending the night there, even though he knew that he was violating a court order by doing so. He drank in the shed and had consumed *382 cocaine about three or four hours earlier.[2]
Defendant saw a light on in the house and approached. He saw Geraldine on the telephone and heard her reading his letter. Using a container of propane, defendant broke a glass door to enter the house. Geraldine tried to leave, but defendant dragged her away and took her upstairs in order to talk with her. Defendant did not remember hitting, biting, or choking her, or getting a knife.
After the telephone rang, defendant told Geraldine that they were going to leave because he believed that the neighbors were going to call the police. Defendant claimed that as they entered the garage, Geraldine pulled a knife from a drawer. As she took the knife, defendant grabbed her hand, causing the knife to fall on the floor, where it remained. Defendant intended to drive her to the home of the woman with whom he suspected she was romantically involved.
Defendant admitted backing the car through the garage door because Geraldine had changed the code for the opener. As defendant was driving, Geraldine was able to get out of the car and she pulled him out of the driver's seat. The next thing that defendant remembered was being involved in a traffic accident. Defendant did not remember assaulting Geraldine. Defendant believed a knife found by the police in the roadway had been "planted."
To rebut defendant's version of what happened, the prosecution called Fernando Garcia Mora, who saw Geraldine being ejected from her car. Defendant got out of the car, "calmly" walked up to Geraldine's location and straddled her. He punched Geraldine hard with his closed fists about seven to 10 times. After Mora got out of his car with a large flashlight, he told defendant to stop, and he did. Defendant "calmly" walked back to the car and drove off.
Geraldine denied that she ever had possession of the knife during the incident. She did not pull defendant out of the car with her.

BURGLARY CONVICTION
According to the evidence, defendant and Geraldine lived together in the home on Chapparal which they had purchased jointly during their marriage. Thus, the home constituted community property. However, after defendant assaulted Geraldine on October 2, 2000, she obtained a court order which temporarily gave her the exclusive possession of the residence. Defendant was served with notice of the court's order while he was in jail following the October 2 incident. Defendant acknowledged that, when he forcibly entered the home on October 10, he was violating a court order. On appeal, he challenges his conviction of burglary, arguing that "while [he could] be excluded from a community residence by temporary family law orders making an uninvited entry a trespass, he should not be convicted of felony residential burglary for entering premises in which he owns a co-equal interest."
At common law, burglary was defined as "`the breaking and entering of the dwelling of another in the nighttime with intent to commit a felony.'" (People v. Gauze (1975) 15 Cal.3d 709, 711, 125 Cal. Rptr. 773, 542 P.2d 1365, italics omitted (Gauze).) Currently, burglary is defined as the entry into any building with the intent to commit a grand or petty larceny or any felony. (§ 459.) Although the Penal Code has substantially changed some *383 of the common law elements of burglary, our Supreme Court has held that "two important aspects of that crime" remain: the entry must invade a possessory right in the building and it must be committed by one who has no right to be in the building. (Gauze, supra, 15 Cal.3d at p. 714, 125 Cal.Rptr. 773, 542 P.2d 1365.) Because the crime of burglary requires the invasion of a possessory right in a building, one cannot be found guilty of burglarizing one's own residence. (Ibid.; see People v. Salemme (1992) 2 Cal.App.4th 775, 781, 3 Cal.Rptr.2d 398 [one who enters a building with the intent to commit a felony therein is guilty of burglary except when he or she "(1) has an unconditional possessory right to enter as the occupant of that structure or (2) is invited in by the occupant who knows of and endorses the felonious intent."].)
In Gauze, in which the Supreme Court held that a person may not be convicted of burglarizing his own home, the defendant shared an apartment with two other persons "and thus had the right to enter the premises at all times." (Gauze, supra, 15 Cal.3d at p. 711, 125 Cal.Rptr. 773, 542 P.2d 1365.) The defendant got into a quarrel with one of his roommates while they were away from the apartment, and defendant told the roommate to "`Get your gun because I am going to get mine.'" (Ibid.) The defendant borrowed a shotgun from a neighbor and returned to the apartment where he shot the roommate. He was convicted of assault with a deadly weapon and burglary. The court reversed the burglary conviction. The court explained, "we conclude that defendant cannot be guilty of burglarizing his own home. His entry into the apartment, even for a felonious purpose, invaded no possessory right of habitation; only the entry of an intruder could have done so. More importantly, defendant had an absolute right to enter the apartment. . . . It was a personal right that could not be conditioned on the consent of defendant's roommates. Defendant could not be `refused admission at the threshold' of his apartment, or be `ejected from the premises after the entry was accomplished.' [Citation.] He could not, accordingly, commit a burglary in his own home." (Id. at p. 714, 125 Cal.Rptr. 773, 542 Cal.Rptr.2d 1365; see also People v. Pendleton (1979) 25 Cal.3d 371, 382, 158 Cal.Rptr. 43, 599 P.2d 649 ["[O]ne has an unconditional right to enter his own home, even for a felonious purpose."].) Thus, following Gauze, courts have held that "[t]o sustain a burglary conviction, the People must prove that a defendant does not have an unconditional possessory right to enter his or her family residence. [Citation.]" (People v. Davenport (1990) 219 Cal.App.3d 885, 892, 268 Cal.Rptr. 501 (Davenport); Fortes v. Municipal Court (1980) 113 Cal.App.3d 704, 713-714, 170 Cal.Rptr. 292 (Fortes).)
The People rely upon (People v. Sears (1965) 62 Cal.2d 737, 44 Cal.Rptr. 330, 401 P.2d 938 (Sears), overruled on another ground in People v. Cahill (1993) 5 Cal.4th 478, 510, fn. 17, 20 Cal.Rptr.2d 582, 853 P.2d 1037. In Sears, the defendant had moved out of the family residence, but three weeks later entered the family residence through an unlocked door. Once inside, he got into an argument with his wife, Clara, during which he assaulted her with a pipe he had concealed under his shirt. When his stepdaughter attempted to intervene, the defendant assaulted and killed her. The defendant was convicted of first degree felony murder. The Supreme Court reversed the conviction on other grounds, but concluded that the evidence supported giving an instruction on felony murder based on burglary. The court explained, "We reject defendant's contention that the court should not have given the burglary instruction because defendant, *384 as Clara's husband, had a right to enter the family home. One who enters a room or building with the intent to commit a felony is guilty of burglary even though permission to enter has been extended to him personally or as a member of the public. [Citation.] The entry need not constitute a trespass. [Citations.] Moreover, since defendant had moved out of the family home three weeks prior to the crime, he could claim no right to enter the residence of another without permission. Even if we assume that defendant could properly enter the house for a lawful purpose [citation], such an entry still constitutes burglary if accomplished with the intent to commit a felonious assault within it." (Sears, supra, 62 Cal.2d at p. 746, 44 Cal.Rptr. 330, 401 P.2d 938.)
Gauze has not overruled Sears. Instead, our high court explained its holding in Sears: "`[O]ur opinion that Sears could be convicted of burglary was based on two separate considerations. First, Sears had no right to enter his wife's house; that fact alone supported the conviction. Second, even if he had a right to enter, the right was based on former section 157 of the Civil Code (now § 5102) [currently Family Code section 753], which gave a person the right to enter the separate property of his or her spouse, subject to certain conditions. Thus, Sears' "right" to enter his wife's house . . . was at best conditional. An entry for anything but a legal purpose was a breach of his wife's possessory rights, . . .' [Citation.]" (Davenport, supra, 219 Cal.App.3d at 885, 891-892, 268 Cal.Rptr. 501.)
Based on the above case law, we reject defendant's argument that he had a right to enter the Chapparal home. Instead, the court order which temporarily gave Geraldine the sole possession denied defendant an unconditional possessory right to enter his family residence. (Davenport, supra, 219 Cal.App.3d 885, 892, 268 Cal. Rptr. 501.) We therefore conclude the evidence was sufficient to support defendant's conviction of burglary.
Notwithstanding the above, defendant argues that the Sears case is inapplicable because (1) it did not involve community property; (2) the family law court cannot award sole possession of the house to Geraldine (Machado v. Machado (1962) 58 Cal.2d 501, 507, 25 Cal.Rptr. 87, 375 P.2d 55); and (3) he did not move out of the house. During oral argument, defense counsel emphasized the limitations placed on family law courts regarding their ability to award exclusive possession of community property to one spouse. While we agree that in the marital dissolution setting no one party can be awarded the sole right to possess his or her community property, we disagree that such restriction logically extends to the criminal setting. The possessory right protected under the Family Code differs from that contemplated under the Penal Code. "The possessory right protected by section 459 is the `right to exert control over property to the exclusion of others' or, stated differently, the `right to enter as the occupant of that structure.' [Citation.]" (People v. Clayton (1998) 65 Cal.App.4th 418, 421, fn. 3, 76 Cal.Rptr.2d 536.)
At oral argument, the People provided the following analogy: When a landlord leases property to a tenant, the landlord retains a qualified possessory interest in the property. The landlord's possession of the leased property is qualified because the possessory interest in the property is vested in the tenant during the lease term. Thus, if the landlord were to break into the tenant's apartment and commit a felony, the landlord could be charged with, and convicted of, committing a burglary. *385 Regardless of the fact that the landlord has a possessory interest in the apartment by virtue of the fact that he or she owns the property, such interest is qualified because he does not possess the right to enter as the occupant during the lease period.
In this case, Geraldine was awarded sole possession of the family home and she was granted a TRO against defendant because of his acts of violence towards her. Thus, although defendant had a possessory interest in the family home, he did not possess the right to enter as an occupant when Geraldine was present. Geraldine, on the other hand, retained the right to enter as an occupant at any time. Given the distinction, defendant could be charged with burglary of the family home just like a landlord could be charged with burglary of the tenant's property.
Moreover, as our Supreme Court has observed, the reason why a person cannot be charged with burglarizing his own home is because he has an absolute right to enter his own home. (Gauze, supra, 15 Cal.3d 709, 712-713, 125 Cal.Rptr. 773, 542 P.2d 1365.) " "[N]o danger arises from the mere entry of a person into his own home, no matter what his intent is. He may cause a great deal of mischief once inside. But no emotional distress is suffered, no panic is engendered, and no violence necessarily erupts merely because he walks into his house." (Id. at pp. 715-716, 125 Cal.Rptr. 773, 542 P.2d 1365, emphasis added.) Clearly, given the relationship between defendant and Geraldine, as evidenced by the TRO and the award of sole possession to Geraldine, a danger does arise when defendant enters the family home while Geraldine is present. Accordingly, under the specific facts of this case, defendant could be charged and convicted of burglarizing his own home.
Contrary to defense counsel's claim, we do not believe that our holding will result in a significant increase in the number of claims of burglary by one spouse against the other during a divorce where one spouse is awarded sole possession. The reason for this is because there must be a danger that arises from one spouse's mere entry into the family home. Such danger was present in this case by virtue of (1) defendant's past physical abuse of Geraldine, and (2) the TRO. Here, defendant's actions went beyond the mere violation of the TRO. As the facts demonstrated, defendant was in violation of the TRO by being in the shed on the property when Geraldine was present. However, he did not stop there. As the jury found, defendant, who knew that Geraldine was in the house, forced his way into the family home with the intent to commit a crime. In other words, he committed a burglary.
Finally, defendant claims that section 273.6[3] conflicts with the burglary statute, and thus, section 273.6 should prevail over section 459. The People disagree, arguing that the two penal provisions do not cover the same conduct. One can commit a burglary without violating section 273.6. Conversely, one can violate section 273.6 without committing a burglary. We agree with the People.

SUFFICIENCY OF EVIDENCE OF


*386 ATTEMPTED MURDER[**]


UNANIMITY INSTRUCTION[**]

SUFFICIENCY OF EVIDENCE OF ON-BAIL ENHANCEMENT
In count 1, defendant was charged with felony spousal battery (§ 273.5, subd. (a)) based on his actions of October 2, 2000. The other counts were committed on the night of October 10. As to the counts committed on October 10, the jury found the allegations pursuant to section 12022.1 to be true, i.e., that defendant was out on bail on a felony offense at the time of the commission of those offenses. Defendant contends there was insufficient evidence to support the jury's true findings of those allegations. He argues that, for a section 12022.1 allegation to be found true, he had to be charged with, or arrested for, a felony at the time when he was released from custody on the primary offense.
The People concede that there was no explicit testimony that defendant was arrested for a felony following the October 2, 2000, incident, and that the prosecution did not introduce documentary evidence concerning defendant's release on bail following the arrest. Nonetheless, the People contend that substantial evidence supports a finding that defendant was initially charged with a felony concerning the October 2 incident and therefore he had been released on bail on a felony charge.
Section 12022.1, subdivision (b), provides: "Any person arrested for a secondary offense which was alleged to have been committed while that person was released from custody on a primary offense shall be subject to a penalty enhancement of an additional two years in state prison which shall be served consecutive to any other term imposed by the court." The statute defines "primary offense" to mean "a felony offense for which a person has been released from custody on bail or on his or her own recognizance prior to the judgment becoming final . . . or for which release on bail or his or her own recognizance has been revoked." (Id. subd. (a)(1).) Section 12022.1, subdivision (a)(2), defines "secondary offense" to mean "a felony offense alleged to have been committed while the person is released from custody for a primary offense."
On October 2, 2000, defendant assaulted Geraldine. Police officers took pictures of her arm and leg. This assault, or primary offense, constituted a violation of section 273.5, subdivision (a), which the prosecution charged as a felony. In the same information, the prosecution charged defendant with various other counts based on his actions on the night of October 10. As to these secondary offenses, the prosecution alleged, pursuant to section 12022.1, that at the time defendant committed them, he was released from custody prior to the judgment becoming final on his violation of section 273.5. The jury convicted defendant of the section 273.5 charge. It further found the section 12022.1 allegation to be true.
According to defendant, the prosecution had to "prove the nature of the crime at the time the defendant [was] released on bail or O.R. Having failed to prove whether the bail posted by [defendant] was for a misdemeanor or felony charge for which he had been booked, the government has failed to prove all the elements necessary for imposition of the on-bail enhancement." We disagree.
Section 12022.1 does not make the defendant's conviction of the primary offense an element of the enhancement for the purpose of proving the enhancement. *387 Instead, the statute only requires proof of conviction of the primary offense before the enhancement can be imposed. (People v. Walker (2002) 29 Cal.4th 577, 586, 128 Cal.Rptr.2d 75, 59 P.3d 150; see § 12022.1, subds. (b), (c), & (d).) At the trial of a section 12022.1 enhancement, the jury only determines whether the enhancement is proven. The court determines later, at the time of sentencing, whether the enhancement can be imposed.
Indeed, section 12022.1 recognizes that in some cases, the defendant may not have been convicted of the primary offense at the time the section 12022.1 allegation is tried, because the secondary offense may be tried first. Subdivision (d) of section 12022.1 provides: "Whenever there is a conviction for the secondary offense and the enhancement is proved, and the person is sentenced on the secondary offense prior to the conviction of the primary offense, the imposition of the enhancement shall be stayed pending imposition of the sentence for the primary offense." It would make no sense to require that the jury find, as an element of section 12022.1, that the defendant was convicted of the primary offense, when the primary offense may not even be tried until after the jury has been discharged in the trial of the secondary offense.
Furthermore, it is not the jury that determines whether the primary offense was a felony. The determination of whether an offense that is a wobbler constitutes a felony or a misdemeanor is made by the People at the time the charging allegations are filed or by the judge at the time of sentencing.[4] Here, defendant was charged with a felony and the trial court sentenced him on the felony. Thus, we reject defendant's challenge to his section 12022.1 enhancement.


SENTENCING[***]

DISPOSITION
The case is remanded to the trial court with directions to strike six years from the section 12022.1 enhancement term imposed on count 3 and to correct and modify the abstract of judgment accordingly. As modified, the judgment is affirmed. The trial court is directed to prepare an amended abstract of judgment and to forward a copy of the modified abstract of judgment to the Department of Corrections.
We concur: McKINSTER and RICHLI, JJ.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for partial publication with the exception of the parts entitled "SUFFICIENCY OF EVIDENCE OF ATTEMPTED MURDER," "UNANIMITY INSTRUCTION," and "SENTENCING."
[1]  All further statutory references are to the Penal Code unless otherwise indicated.
[2]  Following defendant's arrest, his blood tested positive for cocaine.
[3]  Section 273.6, subdivision (a) states: "Any intentional and knowing violation of a protective order . . . is a misdemeanor punishable by a fine of not more than one thousand dollars ($1,000), or by imprisonment in a county jail for not more than one year, or by both that fine and imprisonment." (§ 273.6, subd. (a).)
[**]   See footnote *, ante.
[4]  Whether a defendant's primary offense for purposes of section 12022.1 is a felony is a question of law. "A felony is a crime which is punishable with death or by imprisonment in the state prison." (§ 17, subd. (a).) The determination whether a primary offense is a felony is purely a legal one and can be made by the sentencing judge based on the punishment for the offense. No factual findings are necessary to make the determination.
[***]   See footnote *, ante.
