mirror of
https://github.com/kr15h/ofxPiMapper.git
synced 2026-06-16 12:31:49 +02:00
Fix crashing on mouse release if no source selected
- SurfaceManagerGui mouseRelease method did not check whether a surface is selected before checking if a selected surface has been moved
This commit is contained in:
@@ -199,8 +199,10 @@ namespace ofx {
|
||||
textureEditor.stopDragJoints();
|
||||
|
||||
// Check if surface has moved
|
||||
if (!surfaceManager->getSelectedSurface()->getMoved()) {
|
||||
_cmdManager->undo();
|
||||
if (surfaceManager->getSelectedSurface()){
|
||||
if (!surfaceManager->getSelectedSurface()->getMoved()) {
|
||||
_cmdManager->undo();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user