[Bf-blender-cvs] [4cbefde] master: Audaspace: fix incorrect parameter check in python API.

Jörg Müller noreply at git.blender.org
Sat Jul 23 13:39:30 CEST 2016


Commit: 4cbefde47c68aa0306df583b160c2e3103b908a7
Author: Jörg Müller
Date:   Sat Jul 23 13:35:36 2016 +0200
Branches: master
https://developer.blender.org/rB4cbefde47c68aa0306df583b160c2e3103b908a7

Audaspace: fix incorrect parameter check in python API.

Found by PVS-Studio T48917

===================================================================

M	intern/audaspace/Python/AUD_PyAPI.cpp

===================================================================

diff --git a/intern/audaspace/Python/AUD_PyAPI.cpp b/intern/audaspace/Python/AUD_PyAPI.cpp
index 300fd55..de5c0a2 100644
--- a/intern/audaspace/Python/AUD_PyAPI.cpp
+++ b/intern/audaspace/Python/AUD_PyAPI.cpp
@@ -861,7 +861,7 @@ Factory_filter(Factory* self, PyObject *args)
 	py_a_len= py_a ? PySequence_Size(py_a) : 0;
 	py_b_len= PySequence_Size(py_b);
 
-	if(!py_b_len || ((py_a != NULL) && !py_b_len))
+	if(!py_b_len || ((py_a != NULL) && !py_a_len))
 	{
 		PyErr_SetString(PyExc_ValueError, "The sequence has to contain at least one value!");
 		return NULL;




More information about the Bf-blender-cvs mailing list