Commits

Anonymous committed 8cb5623

COINSUPPORT-1385: Fixed bug with unbalanced ref/unref-pair in handleEvent in SoDragger

  • Participants
  • Parent commits 8dfa1b9

Comments (0)

Files changed (1)

File src/draggers/SoDragger.cpp

   // return if handled by a child
   if (action->isHandled()) return;
 
+  // Protect dragger from deletion
+  this->ref();
+
   // this is a special case, to be able to detect when somebody
   // clicks ctrl over a dragger. This has a special meaning for
   // some draggers, and it's the only time the otherEvent callbacks
       }
     }
 
-    this->ref();
-
     if (didpick) {
       if (!action->getGrabber())
         this->updateDraggerCache(action->getCurPath());
   if (!action->isHandled())
     inherited::handleEvent(action);
 
+  // Unprotect dragger
   this->unref();
 }