  Several observations of transition discs show lopsided dust-distributions. A
potential explanation is the formation of a large-scale vortex acting as a
dust-trap at the edge of a gap opened by a giant planet. Numerical models of
gap-edge vortices have thus far employed locally isothermal discs, but the
theory of this vortex-forming or `Rossby wave' instability was originally
developed for adiabatic discs. We generalise the study of planetary gap
stability to non-isothermal discs using customised numerical simulations of
disc-planet systems where the planet opens an unstable gap. We include in the
energy equation a simple cooling function with cooling timescale
$t_c=\beta\Omega_k^{-1}$, where $\Omega_k$ is the Keplerian frequency, and
examine the effect of $\beta$ on the stability of gap edges and vortex
lifetimes. We find increasing $\beta$ lowers the growth rate of
non-axisymmetric perturbations, and the dominant azimuthal wavenumber $m$
decreases. We find a quasi-steady state consisting of one large-scale,
over-dense vortex circulating the outer gap edge, typically lasting $O(10^3)$
orbits. Vortex lifetimes were found to generally increase with cooling times up
to an optimal value, beyond which vortex lifetimes decrease. This non-monotonic
dependence is qualitatively consistent with recent studies using strictly
isothermal discs that vary the disc aspect ratio.
