X-Git-Url: https://git.openstreetmap.org/potlatch2.git/blobdiff_plain/a22f489ac9366c6a29d0cbe4da43e5b5545b8552..6db81c79b5cf418efc8b1bdfe7731e53608ee159:/net/systemeD/potlatch2/TagViewer.mxml 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);