EA-54991 - ISE: CaretModelImpl.getCurrentCaret

This commit is contained in:
Dmitry Batrak
2014-03-24 16:45:42 +04:00
parent 9885d31f22
commit 8162e5a286
@@ -229,7 +229,8 @@ public class CaretModelImpl implements CaretModel, PrioritizedDocumentListener,
@Override
@NotNull
public CaretImpl getCurrentCaret() {
return ApplicationManager.getApplication().isDispatchThread() && myCurrentCaret != null ? myCurrentCaret : getPrimaryCaret();
CaretImpl currentCaret = myCurrentCaret;
return ApplicationManager.getApplication().isDispatchThread() && currentCaret != null ? currentCaret : getPrimaryCaret();
}
@Override