From 6db81c79b5cf418efc8b1bdfe7731e53608ee159 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Fri, 3 Sep 2010 14:08:35 +0000 Subject: [PATCH] Prevent error if + pressed while nothing is selected --- net/systemeD/potlatch2/TagViewer.mxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/systemeD/potlatch2/TagViewer.mxml b/net/systemeD/potlatch2/TagViewer.mxml index 213c0d15..244e1d46 100644 --- a/net/systemeD/potlatch2/TagViewer.mxml +++ b/net/systemeD/potlatch2/TagViewer.mxml @@ -562,7 +562,7 @@ } public function addNewTag():void { - if (stack.selectedChild!=advancedContainer) { return; } + if (stack.selectedChild!=advancedContainer || selectedEntity == null) { return; } var newKey:String = "(new tag)"; var newTag:Tag = new Tag(selectedEntity, newKey, "(new value)"); tagDataProvider.addItem(newTag); -- 2.30.0