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:
Krisjanis Rijnieks
2015-05-21 17:38:58 +02:00
parent 7e7aa93226
commit bb720731f2
+4 -2
View File
@@ -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();
}
}
}