don't break when you ctrl-click the background
[potlatch2.git] / net / systemeD / potlatch2 / controller / SelectedMultiple.as
index ea3db7cca1438778bfb417c8f217f65a5e4578b9..912195e5adc69de6cf871329cb28ffc07e18e42d 100644 (file)
@@ -19,7 +19,7 @@ package net.systemeD.potlatch2.controller {
                        if (event.type==MouseEvent.MOUSE_MOVE || event.type==MouseEvent.ROLL_OVER || event.type==MouseEvent.MOUSE_OUT) { return this; }
                        var focus:Entity = getTopLevelFocusEntity(entity);
 
-                       if ( event.type == MouseEvent.MOUSE_DOWN && event.ctrlKey ) {
+                       if ( event.type == MouseEvent.MOUSE_DOWN && entity && event.ctrlKey ) {
                                // modify selection
                                controller.map.setHighlight(entity, { selected: toggleSelection(entity) });
                                controller.updateSelectionUI();