Skip to content

Commit 1c6afe5

Browse files
author
mgricken
committed
Fixing bug 3436749: NullPointerException in disableAutomaticTrace in Interaction
http://sourceforge.net/tracker/?func=detail&aid=3436749&group_id=44253&atid=438935 This happened when there was no debugger available, e.g. when only the Eclipse compiler is found. git-svn-id: file:///tmp/test-svn/trunk@5455 fe72c1cf-3628-48e9-8b72-1c46755d3cff
1 parent 0dc7e61 commit 1c6afe5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drjava/src/edu/rice/cs/drjava/ui/MainFrame.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5781,6 +5781,7 @@ void debuggerAutomaticTrace() {
57815781

57825782
/** Enable automatic trace. Assumes that the debugger is ready. */
57835783
private void enableAutomaticTrace() {
5784+
if (!isDebuggerEnabled()) return; // debugger isn't used
57845785
try {
57855786
int rate = DrJava.getConfig().getSetting(OptionConstants.AUTO_STEP_RATE);
57865787

@@ -5809,6 +5810,7 @@ public void actionPerformed(ActionEvent e) {
58095810

58105811
/** Disable the automatic trace. Assumes that the debugger is ready. */
58115812
private void disableAutomaticTrace() {
5813+
if (!isDebuggerEnabled()) return; // debugger isn't used
58125814
_log.log("disableAutomaticTrace(): isDebuggerReady() = "+isDebuggerReady());
58135815
_model.getDebugger().setAutomaticTraceEnabled(false);
58145816
_debugPanel.setAutomaticTraceButtonText();
@@ -6945,7 +6947,7 @@ private void _setDebugMenuItemsEnabled(boolean isEnabled) {
69456947
private void _setThreadDependentDebugMenuItems(boolean isSuspended) {
69466948
_guiAvailabilityNotifier.ensureAvailabilityIs(GUIAvailabilityListener.ComponentType.DEBUGGER_SUSPENDED,
69476949
isSuspended);
6948-
_debugPanel.setAutomaticTraceButtonText();
6950+
if (_showDebugger) { _debugPanel.setAutomaticTraceButtonText(); }
69496951
}
69506952

69516953
/** Creates and returns the language levels menu.

0 commit comments

Comments
 (0)