[rhythmbox] encoding-settings: don't create editors with no properties to edit
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] encoding-settings: don't create editors with no properties to edit
- Date: Sat, 5 Aug 2017 10:20:50 +0000 (UTC)
commit bc06095a6438ec997da57609c6e645f4b8582b0d
Author: Jonathan Matthew <jonathan d14n org>
Date: Sat Aug 5 20:19:24 2017 +1000
encoding-settings: don't create editors with no properties to edit
https://bugzilla.gnome.org/show_bug.cgi?id=785304
widgets/rb-encoding-settings.c | 38 ++++++++++++++++++++------------------
1 files changed, 20 insertions(+), 18 deletions(-)
---
diff --git a/widgets/rb-encoding-settings.c b/widgets/rb-encoding-settings.c
index d3949ee..772d686 100644
--- a/widgets/rb-encoding-settings.c
+++ b/widgets/rb-encoding-settings.c
@@ -159,24 +159,26 @@ update_property_editor_for_preset (RBEncodingSettings *settings, const char *med
profile_settings =
rb_gst_encoding_profile_get_settings (profile,
encoding_styles[style].style);
- settings->priv->encoder_property_editor =
- rb_object_property_editor_new (G_OBJECT (settings->priv->encoder_element),
- profile_settings);
- g_strfreev (profile_settings);
- gst_encoding_profile_unref (profile);
-
- settings->priv->profile_changed_id =
- g_signal_connect (settings->priv->encoder_property_editor,
- "changed",
- G_CALLBACK (profile_changed_cb),
- settings);
-
- gtk_grid_attach (GTK_GRID (settings->priv->encoder_property_holder),
- settings->priv->encoder_property_editor,
- 0, 0, 1, 1);
- gtk_widget_show_all (settings->priv->encoder_property_editor);
-
- settings->priv->preset_name = g_strdup (preset);
+ if (profile_settings != NULL) {
+ settings->priv->encoder_property_editor =
+ rb_object_property_editor_new (G_OBJECT (settings->priv->encoder_element),
+ profile_settings);
+ g_strfreev (profile_settings);
+ gst_encoding_profile_unref (profile);
+
+ settings->priv->profile_changed_id =
+ g_signal_connect (settings->priv->encoder_property_editor,
+ "changed",
+ G_CALLBACK (profile_changed_cb),
+ settings);
+
+ gtk_grid_attach (GTK_GRID (settings->priv->encoder_property_holder),
+ settings->priv->encoder_property_editor,
+ 0, 0, 1, 1);
+ gtk_widget_show_all (settings->priv->encoder_property_editor);
+
+ settings->priv->preset_name = g_strdup (preset);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]