Check that range is valid in case callback happens before ui is fully built

This commit is contained in:
Nick Lanham 2012-03-27 16:02:30 +02:00
parent b219c64dc5
commit b5f2a60d44

View File

@ -623,7 +623,8 @@ struct slider_callback_data {
};
static gboolean slider_callback(gpointer data) {
struct slider_callback_data *cbd = (struct slider_callback_data*)data;
gtk_range_set_value(cbd->range,cbd->val);
if (GTK_IS_RANGE(cbd->range))
gtk_range_set_value(cbd->range,cbd->val);
free(cbd);
return FALSE; // don't keep calling
}