We study the influence of an external magnetic field on the deconfinement transition in two-flavour lattice QCD with physical quark charges. We use dynamical overlap fermions without any approximation such as fixed topology and perform simulations on a $16^3 times 6$ lattice and at a pion mass around $500MeV$. The pion mass (as well as the lattice spacing) was determined in independent runs on $12^3 times 24$ lattices. We consider two temperatures, one of which is close to the deconfinement transition and one which is above. Within our limited statistics the dependence of the Polyakov loop and chiral condensate on the magnetic field supports the inverse magnetic catalysis scenario in which the transition temperature decreases as the field strength grows for temperature not to far above the critical temperature.