Get a permits and this situation isn't a problem anymore.

As pointed out earlier, if the pistol is in your backpack in a holster and unloaded, I think any cop judge or jury will be hard pressed to make a claim it was readily available. but then what's the point of having it? Get a permit.