This can be a challenging situation. While smelling marijuana can give police probable cause to search your car, it is often decided on an individual basis. For this reason, police often claim they smelled something that smelled like pot and sometimes they may even lie about it. One thing you can do is not open your car window more than wide enough to give the police officer your license, registration and insurance card and then close it back up. That way, they can't very well say they could smell anything. If they tell you to open your window, there is no obligation to do so, however, recognize that they are the power on the street and they will ordinarily jump to the conclusion that you are hiding the smell or other objects within your car and force you to open your window and/or door. Mostly, all you can really do is say, "Officer, I have nothing to hide, but I don't consent to any searches." When they search you anyway and if something is found, of course, you'll need an attorney to help you defend yourself against the charges.