Jihad is to be carried on whether the Muslim ruler is good or bad
حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا زَكَرِيَّاءُ، عَنْ عَامِرٍ، حَدَّثَنَا عُرْوَةُ الْبَارِقِيُّ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " الْخَيْلُ مَعْقُودٌ فِي نَوَاصِيهَا الْخَيْرُ إِلَى يَوْمِ الْقِيَامَةِ الأَجْرُ وَالْمَغْنَمُ ".
Narrated `Urwa Al-Bariqi: The Prophet (ﷺ) said, "Good will remain (as a permanent quality) in the foreheads of horses (for Jihad) till the Day of Resurrection, for they bring about either a reward (in the Hereafter) or (war) booty (in this world)."