
3 So.3d 539 (2008)
STATE of Louisiana
v.
Arthur HICKS.
No. 08-KA-402.
Court of Appeal of Louisiana, Fifth Circuit.
December 16, 2008.
*540 Paul D. Connick, Jr., District Attorney, Twenty-Fourth Judicial District, Parish of Jefferson, Terry M. Boudreaux, Andrea F. Long, Assistant District Attorneys, Gretna, Louisiana, for Plaintiff/Appellee.
John T. Fuller, Attorney at Law, New Orleans, LA, for Defendant/Appellant.
*541 Panel composed of Judges MARION F. EDWARDS, FREDERICKA HOMBERG WICKER, and GREG G. GUIDRY.
GREG G. GUIDRY, Judge.
The Defendant, Arthur Hicks, appeals from his conviction of possession of a firearm by a convicted felon, in violation of La.R.S. 14:95.1. We affirm and remand for corrective action.
The Defendant was charged by a bill of information with the offense on February 1, 2006. He subsequently pled not guilty, and filed pre-trial motions to suppress the evidence and statements. The trial judge denied the motions, and on March 17, 2007, he waived his right to a jury trial. Following the bench trial on March 21 and 22, 2007, the Defendant was found guilty as charged. The Defendant subsequently filed a motion to reconsider the motion to suppress evidence, which was denied. On May 1, 2007, the trial judge sentenced the Defendant to imprisonment at hard labor for ten years to run concurrently with sentences in two other cases, and any other sentence he was serving.
The evidence at the trial showed that, on the morning of February 1, 2006, the Defendant's probation officer, Agent Kevin Wall, went to the Defendant's residence at 1625 East Judah, Apartment A, in Marrero to conduct a surprise visit. When the Agent arrived, he knocked on the door and identified himself as a probation officer. The Defendant allowed the officer to enter the apartment. While they were talking, another man who was sleeping on a bed in the room woke up and identified himself as Troy Williams.
Agent Wall believed that Williams was wanted by the Department of Probation and Parole for absconding from supervision. As a result, the Agent immediately left the residence and contacted Williams' probation officer, Brian Poison, to inform him of Williams' whereabouts. Agent Polson told Agent Wall to remain where he was and observe the residence. When Agent Poison and his partner, John Guidry, arrived, they knocked on the door. The Defendant opened it, and the two parole officers went inside with their guns drawn. They told the Defendant to get down on the ground.
Agent Poison handcuffed the Defendant and Williams. He stayed with them while Agent Guidry did a "sweep" of the apartment for officer safety. As Agent Guidry walked down the hallway, he saw a gun sitting on top of a dresser in the bedroom on the left-hand side of the hall. Agent Guidry informed Agent Poison that there was a gun present and told him to arrest the Defendant and Williams. The gun had one bullet loaded in the chamber.
After Agent Poison advised the two men of their Miranda[1] rights, the Defendant repeated several times to Agents Poison and Guidry that he knew that there was a gun in the apartment. He explained that he needed a gun for protection because the apartment was in a dangerous area. After the Defendant made those statements, Agent Guidry walked to the back of the apartment to complete his search to ensure that the Defendant had no other weapons or contraband in his room.[2]
Agent Poison testified that the Defendant later changed his story twice. He asserted first that the gun belonged to *542 both him and his live-in girlfriend, Katina Meyers. In his second statement, he claimed the gun belonged to Meyers, who he claimed, purchased it for approximately $100.
Upon investigation of the gun's ownership, it was discovered that the gun had been stolen during a burglary.
The State and the Defendant stipulated that the Defendant had previously been convicted of violating the uniformed controlled substances law in a drug free zone, under La.R.S. 40:981.3.
Troy Williams testified that he did not see a gun in the apartment and that he did not hear the Defendant claim ownership of the gun found in the bedroom. He further testified that, when Agent Guidry returned from the back of the apartment with the gun, the Defendant asked him where he had retrieved it.
According to Meyers, she and the Defendant were living together at the apartment. Meyers paid the rent on the apartment, and the lease was in her name. Meyers stated that she and the Defendant had an on-again/off-again relationship, and that on the day of his arrest, the Defendant had only been back at the apartment for approximately three days after a separation of approximately one month.
Meyers claimed that Agent Wall called her during the incident and that the Defendant got on the phone and told her he was going to jail. Meyers said she told Agent Wall that the gun did not belong to the Defendant. She claims that Agent Wall informed her that it did not matter because the Defendant was not supposed to be around guns. When Meyers told Agent Wall that the gun was hers, Agent Wall told her that she could go to jail for ten years.
Meyers asserted that her apartment was a mess when she got home, and that it was not in that condition when she left. She identified a photograph of her daughter's room that depicted the mess she found. Meyers identified the gun as hers, stating that she purchased it for personal protection from a man two days after the Defendant left. She explained that she and her two children were the only ones living in their building, and that the area was dangerous and had a lot of break-ins. She claimed that she kept the loaded gun under the mattress along with her birth control pills, but that she did not tell the Defendant about it. Meyers admitted she did not know how to load the gun or take the clip out of it, and she never test fired it. She claimed that she never saw the Defendant with a gun, and that the Defendant never told her that he had a gun.
The Defendant testified that he did not have a gun at the apartment, did not possess one on the day in question, and did not know the gun was there. He knew that he was not supposed to have one because he was a convicted felon who was on probation. He denied telling any of the probation officers that the gun belonged to him or that he knew it was in the apartment. The Defendant admitted that he was living in the apartment, but stated he did not keep his clothes there.
Agent Guidry stated that the apartment was very messy when he entered it and that he did not tear it up while searching it. Agent Poison contended that the Defendant never asked him from where he retrieved the weapon. Agent Wall recalled talking to Meyers, but did not remember Meyers telling him that the gun belonged to her.
On appeal, the Defendant asserts that the trial judge erred in denying his motion to suppress the evidence of the gun. He also asserts that the evidence was insufficient to convict him of the crime charged.
*543 When issues are raised on appeal as to sufficiency of the evidence and as to one or more trial errors, the reviewing court should first determine sufficiency of the evidence. When the entirety of the evidence, including inadmissible evidence which was erroneously admitted, is insufficient to support the conviction, the accused must be discharged as to that crime, and any issues regarding trial errors become moot. State v. Hearold, 603 So.2d 731, 734 (La.1992); State v. Guillard, 04-899, p. 9 (La.App. 5 Cir. 4/26/05), 902 So.2d 1061, 1070, writ denied, 05-1381 (La.1/13/06), 920 So.2d 233.
The Defendant argues that the only evidence submitted to convict him of the crime charged was the probation officers' self-serving statements that the Appellant declared ownership of the gun found during the search. He contends that no independent evidence was introduced to prove that the Appellant had knowledge of, and dominion and control over the gun. He argues that under the totality of circumstances no rational trier of fact could have found the requisite knowledge and intent necessary to convict.
Under Jackson v. Virginia, 443 U.S. 307, 99 S.Ct. 2781, 61 L.Ed.2d 560 (1979), the evidence is sufficient if the conviction was based on proof sufficient for any rational trier of fact, viewing the evidence in the light most favorable to the prosecution, to find the essential elements of the crime beyond a reasonable doubt. Jackson, 443 U.S. at 319, 99 S.Ct. at 2789; State v. Ortiz, 96-1609, p. 12 (La.10/21/97), 701 So.2d 922, 930, cert, denied, 524 U.S. 943, 118 S.Ct. 2352, 141 L.Ed.2d 722 (1998); State v. Polizzi, 05-478, p. 9 (La.App. 5 Cir.2/14/06), 924 So.2d 303, 310.
In order to convict a defendant of violating La.R.S. 14:95.1, the State must prove that the defendant was in possession of a firearm and is a convicted felon. State v. Johnson, 03-1228, p. 5 (La.4/14/04), 870 So.2d 995, 998. The State must also prove that ten years has not elapsed since the date of completion of the punishment for the prior felony conviction. State v. Crawford, 03-1494, p. 26 (La.App. 5 Cir. 4/27/04), 873 So.2d 768, 784, writ denied, 04-1744 (La.5/6/05), 901 So.2d 1083. General intent is required to commit this crime. Id.
The facts of each case determine whether the proof is sufficient to establish possession. Johnson, 03-1228 at 5, 870 So.2d at 998. Guilty knowledge of a defendant's intent to possess a firearm may be inferred from the circumstances and proved by direct or circumstantial evidence. Id. Constructive possession of a firearm exists when a firearm is subject to a person's dominion and control. Johnson, 03-1228 at 5, 870 So.2d at 998. Even if the person's dominion over the weapon is only temporary in nature and if control is shared, constructive possession exists. Johnson, 03-1228 at 5, 870 So.2d at 999. However, mere presence of a defendant in an area where a firearm is discovered does not necessarily establish possession. Johnson, 03-1228 at 6, 870 So.2d at 999.
Agent Guidry testified that he saw a loaded gun in plain view on the dresser in one of the two bedrooms in the apartment. The Defendant and Meyers admitted that they were living together in the apartment, and Agent Wall testified that he had previously visited the Defendant at that apartment in December of 2005. Agents Guidry and Poison testified that the Defendant told them that he knew the gun was there, that it was his gun, and that he had it for protection because they lived in a dangerous area.
The Defendant denied owning the gun, claimed he did not know it was in the apartment, and denied telling the agents *544 otherwise. Meyers testified that she had purchased the gun, that it belonged to her, and that the Defendant did not know she had it. She admitted, however, that she did not know how to load the gun or how to take the clip out of it. Agent Guidry confirmed that the neighborhood where the Defendant and Meyers resided was dangerous.
The trial judge was presented with conflicting testimony. The credibility of a witness is within the sound discretion of the trier of fact, who may accept or reject, in whole or in part, the testimony of any witness; therefore, the credibility of witnesses will not be reweighed on appeal. State v. Macon, 06-0481, pp. 7-8 (La.6/1/07), 957 So.2d 1280, 1285-86; State v. Rowan, 97-21, p. 7 (La.App. 5 Cir. 4/29/97), 694 So.2d 1052, 1056. Here, the trial judge found the State's witnesses more credible than the Defendant and his witnesses.
After reviewing the record, we find that a rational trier of fact could have found that the State proved beyond a reasonable doubt that the Defendant had constructive possession of the firearm. The Defendant admitted to living in the apartment and to ownership of the gun. Additionally, the gun was in the apartment where the Defendant was living, and thus had temporary and shared dominion over it. This constitutes constructive possession. See, State v. Frith, 08-52 (La.App. 5 Cir. 4/29/08), 985 So.2d 792, 799.[3] Thus, we find that there was sufficient evidence to support the Defendant's conviction.
The Defendant next asserts that the trial judge erred by denying his motion to suppress the gun seized during the search. The Defendant asserts that Officer Guidry's search under bed mattresses, in dresser drawers and shoe boxes, and in the bathroom garbage can went far beyond what was necessary to secure the apartment after the arrest of Troy Williams.
The Fourth Amendment of the U.S. Constitution and Article I, § 5 of the Louisiana Constitution protect individuals from unreasonable searches and seizures. State v. Manson, 01-159, p. 5 (La. App. 5 Cir. 6/27/01), 791 So.2d 749, 755, cert. denied, 01-2269 (La.9/20/02), 825 So.2d 1156. Warrantless searches and seizures are unreasonable per se unless justified by a specific exception to the warrant requirement. Manson, 01-159 at 8-9, 791 So.2d at 757. When the constitutionality of a warrantless search or seizure is at issue on a motion to suppress, the State bears the burden of proving that the search or seizure was justified under one of the exceptions to the warrant requirement. State v. Narcisse, 01-49, pp. 5-6 (La.App. 5 Cir. 6/27/01), 791 So.2d 149, 153, writ denied, 01-2231 (La.6/14/02), 817 So.2d 1152. Whether evidence was seized in violation of the Fourth Amendment is a determination to be made by the trial judge, whose factual findings are entitled to great weight on appeal. Id.
A recognized exception to the search warrant requirement is a security check of the surrounding area immediately after an arrest. State v. Narcisse, 01-49 at 6, 791 So.2d at 153, citing State v. Guiden, 399 So.2d 194 (La.1981), cert. denied, 454 U.S. 1150, 102 S.Ct. 1017, 71 L.Ed.2d 305 (1982). A "protective sweep" is a quick and limited search of a premises conducted to protect the safety of police officers or others. State v. Nicholas, 06-903, *545 p. 9 (La.App. 5 Cir. 4/24/07), 958 So.2d 682, 688, citing Maryland v. Buie, 494 U.S. 325, 335, 110 S.Ct. 1093, 1099, 108 L.Ed.2d 276. It is narrowly confined to a cursory visual inspection of those places in which a person might be hiding. Id.
In Buie, the Supreme Court found that the Fourth Amendment permits a properly limited protective sweep in conjunction with an in-home arrest when the searching officer possesses a reasonable belief based on specific and articulable facts that the area to be swept harbors an individual posing a danger to those on the arrest scene. Buie, 494 U.S. at 335, 110 S.Ct. at 1099. The Buie Court stated in pertinent part:
As an incident to the arrest the officers could, as a precautionary matter and without probable cause or reasonable suspicion, look in closets and other spaces immediately adjoining the place of arrest from which an attack could be immediately launched. Beyond that, however, we hold that there must be articulable facts which, taken together with the rational inferences from those facts, would warrant a reasonably prudent officer believing that the area to be swept harbors an individual posing a danger to those on the arrest scene.
Buie, 494 U.S. at 334, 110 S.Ct. at 1098.
In United States v. Mata, 517 F.3d 279, 285 (5th Cir.2008), officers conducted a protective sweep of Mata's automobile and truck repair business where they discovered marijuana and weapons in plain view. The sweep was conducted immediately after numerous individuals were arrested outside the gate leading into the premises. In analyzing the case, the Court discussed three variations of post-arrest exceptions to the warrant requirement potentially applicable to protective sweeps based on Chimel[4] and Buie: (footnotes as found in the original):
There are three variations of the post-arrest exception potentially applicable to the officers' "safety personnel sweep." First, incident to an arrest, law enforcement officers may contemporaneously search areas within the arrestee's immediate control to prevent the destruction of evidence or procurement of a weapon. Second, officers may search areas immediately adjoining the place of arrest, such as closets and other spaces, from which a surprise attack could occur. Probable cause or reasonable suspicion is not necessary for these first two variations. Third, officers may also perform cursory "protective sweeps" of larger areas if they have articulable facts plus rational inferences that allow a reasonable officer to suspect that an individual dangerous to the officers is within the area to be searched. [Footnotes omitted.]
In the instant case, we are only concerned with the second type of search.
There are no Louisiana cases with a factual situation similar to the instant one, but United States v. Thomas, 429 F.3d 282 (D.C.Cir.2005), cert. denied, 549 U.S. 1055, 127 S.Ct. 660, 166 L.Ed.2d 519 (2006) involves similar facts.[5]
In Thomas, deputy marshals arrived at the defendant's apartment to arrest him for a parole violation. The defendant was *546 apprehended in the hallway immediately inside his front door. The officers then conducted a protective sweep of the apartment, including the defendant's bedroom, which was located approximately fifteen feet from the entrance of the apartment, at the end of the hall. In plain view on the top closet shelf the officers found a shotgun shell and a handgun.
The court in Thomas held that the search of the defendant's bedroom was a lawful protective sweep even though there was no probable cause or reasonable suspicion. Thomas, 429 F.3d at 287-88. The Court reached this conclusion because the entrance to the bedroom was a straight shot down the hallway from the spot where the defendant was arrested. Thus, the bedroom was a place "immediately adjoining the place of arrest from which an attack could be immediately launched." Thomas, 429 F.3d at 287. The court noted that every room that was swept could be immediately accessed from the hallway, and refused to narrowly define the place of arrest merely in order to avoid permitting the police to sweep the entirety of a small apartment. It stated that the safety of the officers, not the percentage of the home searched, was the relevant criterion. The court concluded that if an apartment was small enough that all of it immediately adjoined the place of arrest, and all of it constituted a space or spaces from which an attack could be immediately launched, then the entire apartment was subject to a limited sweep of spaces where a person may be found. Thomas, 429 F.3d at 287-88.
In this case, Agent Wall drew a diagram of the apartment. The diagram shows a hallway adjoining the living room, and a bathroom located on the right-hand side of the hall. A bedroom is located at the end.
Agent Poison testified that the apartment was small and contained two bedrooms. He agreed with the diagram, except that he thought that the bathroom was on the left-hand side of the apartment. Agent Poison, however, had stayed in the living room and kitchen area during the sweep.
Agent Guidry testified there was at least one other bedroom in the apartment. He described the apartment as average sized, containing a main living room, with a hallway leading off to the left. The Agent stated that the bathroom and one bedroom were on the right-hand side of the hall, and another bedroom was on the left. Agent Guidry saw the gun lying on the dresser in the left side bedroom as he walked down the hallway. He was unsure whether there was a third bedroom. Agent Guidry testified that the hallway was not that long, and that after he walked two feet down the hallway, he could see directly into the two bedrooms.
We find that the Agent's search of the apartment constituted a lawful protective sweep. As in Thomas, the apartment in the instant case was small, and the Defendant's bedroom was located down a hallway from where the Defendant and Williams had been apprehended. Every room in the apartment accessed the hallway. Thus, the Defendant's bedroom was a place "immediately adjoining the place of arrest from which an attack could be immediately launched." See: Buie, 494 U.S. at 335, 110 S.Ct. at 1098; Mata, 517 F.3d at 285.
In addition, the record shows that the agents had reason to be concerned for their safety. When Agents Guidry and Poison went into the apartment to arrest Williams, they knew that at least two convicted felons were there, one of whom had violated his probation by absconding. Furthermore, the apartment is located in a dangerous area, largely comprised of abandoned buildings, where there had been *547 numerous arrests for drug and weapons violations and many break-ins and burglaries. Thus, the protective sweep of the apartment was justified.
Furthermore, the seizure of the gun was constitutional. Evidence in the open or plain view of a police officer who is legally on the premises from which he obtains the view is subject to seizure without a warrant. State v. Nicholas, 06-903 at 10, 958 So.2d at 689. The agents here were legally on the premises to arrest Williams for a probation violation, and the gun was in plain view. Thus, it was subject to seizure without a warrant.
Thus, we find that the trial judge did not err in denying the Defendant's motion to suppress the evidence.

ERROR PATENT
The record was reviewed for patent errors in accordance with La.C.Cr.P. art. 920. See, State v. Oliveaux, 312 So.2d 337, 338 (La.1975); State v. Polizzi, 05-478, p. 18 (La.App. 5 Cir. 2/14/06), 924 So.2d 303, 315. Our review discloses one patent error that requires corrective action.
A defendant has two years after the judgment of conviction and sentence has become final to file for post-conviction relief. La.C.Cr.P. art. 930.8(A). According to the transcript, the trial judge only advised the Defendant that he had two years to file an application for post-conviction relief. The notification was incomplete. Furthermore, the commitment does not reflect that the trial judge advised the Defendant of the provisions of La.C.Cr.P. art. 930.8 at all. When there is a conflict between the commitment and the transcript, the transcript prevails. State v. Lynch, 441 So.2d 732, 733 (La.1983).
This Court routinely remands the case when the notice under La.C.Cr.P. art. 930.8 is incomplete, with an order for the trial judge to advise the Defendant by written notice within ten days of the rendering of this opinion that he has two years from the date his conviction and sentence become final to file his application for post-conviction relief, and then to file written proof in the record that defendant received the notice. See: State v. Jenkins, 07-586, p. 10 (La.App. 5 Cir. 1/22/08), 977 So.2d 142, 150 and State v. Williams, 05-59, pp. 8-9 (La.App. 5 Cir. 5/31/05), 904 So.2d 830, 835.
Accordingly, the Defendant's conviction and sentence are affirmed. Furthermore, the case is remanded for the trial judge to advise the Defendant by written notice within ten days of the rendering of this opinion that he has two years from the date his conviction and sentence become final to file his application for post-conviction relief, and then to file written proof in the record that defendant received the notice.
AFFIRMED AND REMANDED.
NOTES
[1]  Miranda v. Arizona, 384 U.S. 436, 86 S.Ct. 1602, 16 L.Ed.2d 694 (1966).
[2]  Agent Guidry agreed that the neighborhood where the Defendant lived was dangerous as there was a lot of narcotics activity, and numerous narcotics and weapons arrests had been made there.
[3]  See State v. Frith, 985 So.2d at 799, where this Court found that defendant's admission to ownership of the firearms found in his residence, coupled with the other evidence, was sufficient evidence for a rational trier of fact to find proof beyond a reasonable doubt that defendant possessed a firearm.
[4]  Chimel v. California, 395 U.S. 752, 763, 89 S.Ct. 2034, 23 L.Ed.2d 685 (1969).
[5]  The court in United States v. Williams, 2008 WL 1712291 *5 (W.D.La.) quoted Thomas approvingly to support its holding that the kitchen constituted an immediate adjoining space under Buie. In Williams, the kitchen immediately adjoined the area just inside the front door, and defendant was arrested in the doorway of his house, with most of his body still inside.
