From 61cccb22eb5402ece85175bf5c5a4ba931688e4c Mon Sep 17 00:00:00 2001 From: niels Date: Sat, 20 Dec 2014 18:55:50 +0100 Subject: [PATCH] Warn when user (accidently) toggles mixing channel source to sample when only dummy mode is active. --- veejay-current/veejay-server/veejay/vj-perform.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/veejay-current/veejay-server/veejay/vj-perform.c b/veejay-current/veejay-server/veejay/vj-perform.c index 803f2cc7..ac9e1a61 100644 --- a/veejay-current/veejay-server/veejay/vj-perform.c +++ b/veejay-current/veejay-server/veejay/vj-perform.c @@ -1895,9 +1895,18 @@ static int vj_perform_get_frame_( veejay_t *info, int s1, long nframe, uint8_t * } editlist *el = ( s1 ? sample_get_editlist(s1) : info->edit_list); -#ifdef STRICT_CHECKING - assert( el != NULL ); -#endif + if( el == NULL ) { + veejay_msg(VEEJAY_MSG_WARNING, "Selected mixing source and ID does not exist, Use / to toggle mixing type!" ); + if( info->edit_list == NULL ) { + veejay_msg(VEEJAY_MSG_WARNING, "No plain source playing"); + return 0; + } else { + veejay_msg(VEEJAY_MSG_WARNING, "Fetching frame %d from plain source", + nframe ); + el = info->edit_list; + } + } + int cur_sfd = (s1 ? sample_get_framedups(s1 ) : info->settings->simple_frame_dup ); if( max_sfd <= 1 )