Révision 3785

TXM/trunk/bundles/org.txm.treesearch.rcp/src/org/txm/treesearch/command/SendToTreeSearch.java (revision 3785)
105 105
		//System.out.println("s="+s.getClass()+" "+s);
106 106

  
107 107
		String[] words = editor.getEditionPanel(0).getWordSelection();
108

  
108 109
		String word_id = null;
109
		if (words[0] != null && !words[0].isEmpty()) {
110
		if (words != null && words[0] != null && !words[0].isEmpty()) {
110 111
			word_id = words[0];
111 112
		} else {
112 113
			word_id = editor.getEditionPanel(0).getCurrentPage().getWordId();
......
176 177
			ts.setQuery(null);
177 178
		} else {
178 179
			ts = ComputeTreeSearch.getTreeSearchFor(corpus);
180
			if (ts == null) { // no search engine available
181
				return null;
182
			}
179 183
			ts.setQuery(null);
180 184
		}
181 185
		

Formats disponibles : Unified diff