winks: only try to change state when actually open

This commit is contained in:
Ole André Vadla Ravnås 2009-08-31 19:23:40 +02:00
parent 1f6a6d2430
commit a5beb0b8ff

View file

@ -227,7 +227,8 @@ gst_ks_clock_close_unlocked (GstKsClock * self)
GST_KS_CLOCK_LOCK ();
}
gst_ks_clock_set_state_unlocked (self, KSSTATE_STOP);
if (priv->open)
gst_ks_clock_set_state_unlocked (self, KSSTATE_STOP);
if (ks_is_valid_handle (priv->clock_handle)) {
CloseHandle (priv->clock_handle);