By Amy E. Feldman

PHILADELPHIA (CBS) – When can the police enter your house and search through your things and when can’t they?

READ MORE: Philadelphia Fourth Of July Shooting: $20,000 Reward Offered In Shooting That Injured 2 Police Officers During Fireworks Show On Ben Franklin Parkway

When police responded to reports that a gun had been fired inside the home of Natalie Wood and Robert Wagner’s daughter, Courtney Wagner, they entered the house and found cocaine and heroin. They charged her with drug possession. But those charges have been thrown out because, according to the district attorney, the police did not have probable cause or a search warrant to look for drugs.

READ MORE: Philadelphia Mayor Jim Kenney Fed Up With City's Gun Violence Problem, Says He'll Be Happy When He's Not Mayor

Under the Fourth Amendment, unless you consent to the search or if what the police find is out in plain view, in order for police to search your home, they have to have probable cause to believe a crime has taken place and then have to go before a judge to get a search warrant to allow them to search for specific objects. And, if the search is found to be illegal, either because there was no probable cause or no search warrant – or either in this case – whatever the police find is inadmissible.

MORE NEWS: Deputy John Foster Identified As Montgomery County Bomb Squad Member Injured In Philadelphia Fourth Of July Fireworks Shooting

So even though the police found drugs, they can’t be used at trial and a case can’t be brought.