don't break when you ctrl-click the background
[potlatch2.git] / net / systemeD / potlatch2 / controller / SelectedWay.as
index 7e9bf50a77476fcaf2c57ef9d73454c81898e183..d2fa2cc89d3ccfb38c3ce6732fe5ed95bdee5990 100644 (file)
@@ -56,7 +56,7 @@ package net.systemeD.potlatch2.controller {
                 var d:DragWayNode=new DragWayNode(firstSelected as Way, -1, event, true);
                                d.forceDragStart();
                                return d;
-                       } else if ( event.type == MouseEvent.MOUSE_DOWN && event.ctrlKey && entity!=firstSelected) {
+                       } else if ( event.type == MouseEvent.MOUSE_DOWN && event.ctrlKey && entity && entity!=firstSelected) {
                                // multiple selection
                                return new SelectedMultiple([firstSelected,entity]);
                        }