File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
android/src/org/coolreader Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -160,13 +160,16 @@ public DictionaryException(String msg) {
160160 public void findInDictionary (String s ) throws DictionaryException {
161161 log .d ("lookup in dictionary: " + s );
162162 DictInfo curDict = currentDictionary ;
163- if (iDic2IsActive > 0 )
163+ if (iDic2IsActive > 0 && currentDictionary2 != null )
164164 curDict = currentDictionary2 ;
165165 if (iDic2IsActive > 1 )
166166 iDic2IsActive = 0 ;
167167 if (currentDictionary3 != null )
168168 curDict = currentDictionary3 ;
169169 currentDictionary3 = null ;
170+ if (null == curDict ) {
171+ throw new DictionaryException ("Current dictionary are invalid!" );
172+ }
170173 switch (curDict .internal ) {
171174 case 0 :
172175 Intent intent0 = new Intent (curDict .action );
You can’t perform that action at this time.
0 commit comments