summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvb.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_dvb.c')
-rw-r--r--stream/stream_dvb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c
index 7cbd690ee6..3fa1b289a0 100644
--- a/stream/stream_dvb.c
+++ b/stream/stream_dvb.c
@@ -123,6 +123,9 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type)
FILE *f;
char line[CHANNEL_LINE_LEN], *colon;
+ if (!filename)
+ return NULL;
+
int fields, cnt, pcnt, k;
int has8192, has0;
dvb_channel_t *ptr, *tmp, chn;
@@ -799,11 +802,11 @@ dvb_config_t *dvb_get_config(void)
break;
}
- if((access(conf_file, F_OK | R_OK) != 0)) {
+ if(conf_file && (access(conf_file, F_OK | R_OK) != 0)) {
conf_file = talloc_steal(talloc_ctx,
mp_find_user_config_file("channels.conf"));
- if((access(conf_file, F_OK | R_OK) != 0)) {
+ if(conf_file && (access(conf_file, F_OK | R_OK) != 0)) {
conf_file = talloc_steal(talloc_ctx,
mp_find_global_config_file("channels.conf"));
}