Code

fix 224981
authorbuliabyak <buliabyak@users.sourceforge.net>
Tue, 6 May 2008 15:52:23 +0000 (15:52 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Tue, 6 May 2008 15:52:23 +0000 (15:52 +0000)
src/live_effects/effect.cpp

index 40813041c7b50681bb0631813db83c2d6bbb0c0f..cee0c0b211943b356d9d79a77048e62bd2a67199 100644 (file)
@@ -346,8 +346,11 @@ Effect::getParameter(const char * key)
 Parameter *
 Effect::getNextOncanvasEditableParam()
 {
+    if (param_vector.size() == 0) // no parameters
+        return NULL;
+
     oncanvasedit_it++;
-    if (oncanvasedit_it == static_cast<int>(param_vector.size())) {
+    if (oncanvasedit_it >= static_cast<int>(param_vector.size())) {
         oncanvasedit_it = 0;
     }
     int old_it = oncanvasedit_it;