warns that
one should not celebrate or assume success until the danger or difficulty has completely passed.
The saying “Don’t whistle until you are out of the wood” can be used when don't consider a problem solved until it is completely resolved; Do not exult until all danger or difficulty is past.