An electrosurgical generator, a control device, a method for operating the electrosurgical generator and a computer program product. The electrosurgical generator includes an ultrasonic generator for providing an excitation signal by which an ultrasonic converter can generate an ultrasonic vibration, a radiofrequency generator for providing a radiofrequency energy at two output contacts, and a control unit adapted to independently activate the radiofrequency generator and the ultrasonic generator. The control unit is further adapted to determine a DC-offset voltage between the two output contacts of the radiofrequency generator, check if the DC-offset voltage exceeds a DC-offset threshold value, and deactivate the ultrasonic generator if the DC-offset voltage does not exceed the DC-offset threshold.