I guess this is rare bug. I hve seen this...
...if your magic pets have completely lost their attack spells.

There is no (good) solution, try to resart the game (maybe that will help) or just get a new baby pet and feed it.
Actually in v2.0 my ice elemental has lost its spell once too - however in v2.2 i have never seen a pet loose a spell again (it's possibly less probable there).
...if you are used to switched the attacks of your party by keyboard, in that case redefine/resave your key configuration at every game session. A little better explained it is maybe here:
Another Pet Icon/Attack Bug!? (by key configuration) | Gas Powered Garage
Nethertheless you must watch the pet's attack spell yourself form time to time and reselect it manually by mouse.