changeset 25567:ca62d466a9fc

Fix property audio_delay bug when step up/down with arg value NULL. Original patched by Davide Capodaglio <davidecapod A inwind P it>.
author ulion
date Sat, 05 Jan 2008 01:40:36 +0000
parents 4066c3d594d0
children 707b810a2558
files command.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/command.c	Fri Jan 04 09:42:54 2008 +0000
+++ b/command.c	Sat Jan 05 01:40:36 2008 +0000
@@ -590,12 +590,12 @@
     switch (action) {
     case M_PROPERTY_SET:
     case M_PROPERTY_STEP_UP:
-    case M_PROPERTY_STEP_DOWN:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	else {
+    case M_PROPERTY_STEP_DOWN: {
+	    int ret;
 	    float delay = audio_delay;
-	    m_property_delay(prop, action, arg, &audio_delay);
+	    ret = m_property_delay(prop, action, arg, &audio_delay);
+	    if (ret != M_PROPERTY_OK)
+		return ret;
 	    if (mpctx->sh_audio)
 		mpctx->delay -= audio_delay - delay;
 	}