traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso/src/commands/plugins/TraversoCommands ...


From: Ben Levitt
Subject: [Traverso-commit] traverso/src/commands/plugins/TraversoCommands ...
Date: Wed, 02 Jan 2008 02:28:34 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Ben Levitt <benjie>     08/01/02 02:28:34

Modified files:
        src/commands/plugins/TraversoCommands: TraversoCommands.cpp 

Log message:
        Fix potential SEGV errors from malformed keymaps.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/plugins/TraversoCommands/TraversoCommands.cpp?cvsroot=traverso&r1=1.17&r2=1.18

Patches:
Index: TraversoCommands.cpp
===================================================================
RCS file: 
/sources/traverso/traverso/src/commands/plugins/TraversoCommands/TraversoCommands.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- TraversoCommands.cpp        27 Nov 2007 20:35:25 -0000      1.17
+++ TraversoCommands.cpp        2 Jan 2008 02:28:34 -0000       1.18
@@ -215,7 +215,11 @@
                        }
 
                        int x = (int) 
(cpointer().on_first_input_event_scene_x() - view->scenePos().x());
-                       bool anchorAudio = arguments[0].toBool();
+                       
+                       bool anchorAudio = false;
+                       if (arguments.size()) {
+                               anchorAudio = arguments[0].toBool();
+                       }
 
                        if (x < (view->boundingRect().width() / 2)) {
                                if (anchorAudio) {
@@ -243,8 +247,13 @@
                        }
 
                        int x = (int) 
(cpointer().on_first_input_event_scene_x() - view->scenePos().x());
-                       int edge_width = arguments[0].toInt();
-                       bool anchorAudio = arguments[1].toBool();
+                       
+                       int edge_width = 0;
+                       bool anchorAudio = false;
+                       if (arguments.size() == 2) {
+                               edge_width = arguments[0].toInt();
+                               anchorAudio = arguments[1].toBool();
+                       }
 
                        if (x < edge_width) {
                                if (anchorAudio) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]