[gnome-media] Fix a crash issue in the gnome_volume_control_element_whitelist function.
- From: Brian Cameron <bcameron src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-media] Fix a crash issue in the gnome_volume_control_element_whitelist function.
- Date: Wed, 19 Aug 2009 06:05:36 +0000 (UTC)
commit b66b368853a26e2493d0742a0851d79f1c63c71a
Author: Brian Cameron <Brian Cameron sun com>
Date: Wed Aug 19 01:03:35 2009 -0500
Fix a crash issue in the gnome_volume_control_element_whitelist function.
This fix avoids trying to access the track variable before first checking
and handling if it is NULL.
gst-mixer/src/element.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gst-mixer/src/element.c b/gst-mixer/src/element.c
index 262dd23..9874d30 100644
--- a/gst-mixer/src/element.c
+++ b/gst-mixer/src/element.c
@@ -112,15 +112,6 @@ gnome_volume_control_element_whitelist (GstMixer *mixer,
gint i, pos;
gboolean found = FALSE;
- /* honor the mixer supplied hints about whitelisting if available */
- if (gst_mixer_get_mixer_flags (GST_MIXER (mixer)) & GST_MIXER_FLAG_HAS_WHITELIST) {
- if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_WHITELIST)) {
- return (TRUE);
- } else {
- return (FALSE);
- }
- }
-
/* Yes this is a hack. */
static struct {
gchar *label;
@@ -155,6 +146,15 @@ gnome_volume_control_element_whitelist (GstMixer *mixer,
return TRUE;
}
+ /* honor the mixer supplied hints about whitelisting if available */
+ if (gst_mixer_get_mixer_flags (GST_MIXER (mixer)) & GST_MIXER_FLAG_HAS_WHITELIST) {
+ if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_WHITELIST)) {
+ return (TRUE);
+ } else {
+ return (FALSE);
+ }
+ }
+
for (i = 0; !found && list[i].label != NULL; i++) {
gchar *label_l = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]