summaryrefslogtreecommitdiff
path: root/src/modules/mixer
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-09-14 00:33:36 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-09-14 00:33:36 +0000
commit4acc7c4eb9bf63318a6cc7ea157613f958acc022 (patch)
tree76195feb15d8d6dcd14b04a319f974a3d0ddd062 /src/modules/mixer
parentf7e3736068e3ae81bea15b8ca25a53b2fc96f92a (diff)
downloadenlightenment-4acc7c4eb9bf63318a6cc7ea157613f958acc022.tar.gz
well then.. let's not segv if card is null... yes - this is new
behaviour in mixer... at leats i'm not stuck with e crashing almost instantly on start :) SVN revision: 76631
Diffstat (limited to 'src/modules/mixer')
-rw-r--r--src/modules/mixer/app_mixer.c16
-rw-r--r--src/modules/mixer/e_mod_main.c6
2 files changed, 22 insertions, 0 deletions
diff --git a/src/modules/mixer/app_mixer.c b/src/modules/mixer/app_mixer.c
index 2521afb01d..18d2ff0f65 100644
--- a/src/modules/mixer/app_mixer.c
+++ b/src/modules/mixer/app_mixer.c
@@ -152,6 +152,10 @@ _populate_channel_editor(E_Mixer_App_Dialog_Data *app)
const char *card_name;
card_name = e_mod_mixer_card_name_get(app->card);
+
+ if (!card_name)
+ return;
+
e_widget_entry_text_set(ui->card, card_name);
eina_stringshare_del(card_name);
@@ -346,6 +350,9 @@ _create_cards(E_Dialog *dialog __UNUSED__, Evas *evas, E_Mixer_App_Dialog_Data *
const char *card_name;
card_name = e_mod_mixer_card_name_get(card);
+
+ if (!card_name)
+ continue;
e_widget_ilist_append(ui->list, NULL, card_name, _cb_card_selected,
app, card);
@@ -528,6 +535,9 @@ _find_card_by_name(E_Mixer_App_Dialog_Data *app, const char *card_name)
Eina_List *l;
int i;
+ if (!card_name)
+ return 0;
+
for (i = 0, l = app->cards; l; i++, l = l->next)
if (strcmp(card_name, l->data) == 0)
return i;
@@ -543,6 +553,9 @@ _find_channel_by_name(E_Mixer_App_Dialog_Data *app, const char *channel_name)
int i = 0;
int header_input;
+ if (!channel_name)
+ return 0;
+
if (app->channels_infos)
{
info = app->channels_infos->data;
@@ -576,6 +589,9 @@ e_mixer_app_dialog_select(E_Dialog *dialog, const char *card_name, const char *c
if (!dialog)
return 0;
+
+ if ((!card_name) || (!channel_name))
+ return 0;
app = dialog->data;
if (!app)
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index fd4412e19d..32cb5ce6a3 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -834,6 +834,12 @@ _mixer_sys_setup(E_Mixer_Instance *inst)
conf = inst->conf;
if ((!_mixer_using_default) && (!e_mixer_pulse_ready())) return 1;
+ if (!conf->card)
+ {
+ ERR("conf->card in mixer sys setup is NULL");
+ return 1;
+ }
+
if (inst->sys)
e_mod_mixer_del(inst->sys);