fix err in updating cuda drags
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / nbodycuda / nbodywindow.C
index 546f9cbbd9c84476b5351294e748c46465bc0232..12c1fd9f06a3604ebd4d2d29ff9a81618bfd3438 100644 (file)
@@ -179,10 +179,9 @@ N_BodyDrag::N_BodyDrag(N_BodyWindow *gui, int x, int y)
 int N_BodyDrag::handle_event()
 {
        CWindowGUI *cwindow_gui = gui->plugin->server->mwindow->cwindow->gui;
-       int value = get_value();
-       if( value ) {
+       if( get_value() ) {
                if( !gui->grab(cwindow_gui) ) {
-                       update(value = 0);
+                       update(*value = 0);
                        flicker(10,50);
                }
        }
@@ -194,7 +193,7 @@ int N_BodyDrag::handle_ungrab()
 {
        CWindowGUI *cwindow_gui = gui->plugin->server->mwindow->cwindow->gui;
        int ret = gui->ungrab(cwindow_gui);
-       if( ret ) update(value = 0);
+       if( ret ) update(*value = 0);
        return ret;
 }