No, there isn't.
Destroying the Town Hall will give you whatever percentage of loot that is available to you. There are no other conditions. If you're interested in finding out what those percentages are, the Clash of Clans Wiki is a good place to start looking.
But why didn't I get any loot?
The only explanation is that the Town Hall did not have any resources stored in it, or so little resources that you didn't notice. This sounds to me like you attacked an inactive/abandoned base.
How can I tell if the base was abandoned?
Depending on the level of the base, you can tell in a few ways. Full collectors and seemingly empty storages can hint that the base has been abandoned. Higher level bases can provide more compelling evidence. TH9+ bases with X-Bows or Inferno towers can be a clear indicator. These defensive towers require resources in order to fire and have clear visual indicators when they are loaded and when they are empty. If they're empty, then they won't fire and strongly imply that the base is inactive. If the storage buildings also appear empty, then you can assume that there will be little to no resources stored inside the Town Hall.
So, what does this mean for my attack strategy?
As you've mentioned in the comments of your question, Supercell has overhauled how loot is stored, which has forced the raiding meta in the game to change. Since Town Halls no longer provide easy shields and now store resources more comparable to the other storage buildings, players have a large incentive to protect their Town Halls. Exposed Town Halls are easy pickings for free loot... if they contain any. Since it's been a few months since those changes, most abandoned bases with exposed Town Halls have likely been cleaned out from repeated raids by now.
So, should I stop attacking bases with exposed Town Halls?
That depends. I'll sometimes encounter bases with an exposed Town Hall myself and I still tend to pop it. For one, there's still a chance it could hold some loot, which can only be good - especially if I can use a hero like the Archer Queen to do it for free. And I'll also gain a star, which helps fill in my daily star bonus. So, there's still value in destroying exposed Town Halls.