1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 487920 Check if widget is disposed before enable it

Before calling setEnabled on the ToolItem check if it is disposed. If
thats the case, do nothing, else enable the ToolItem. 

Bug: 487920
Change-Id: I1f7b9e0da7f07b2b49e3176e162b9ffb7968439b
Signed-off-by: Martin Schreiber <m.schreiber@bachmann.info>
This commit is contained in:
Martin Schreiber 2016-02-17 10:21:31 +01:00 committed by Gerrit Code Review @ Eclipse.org
parent a3eb9edc59
commit c6bc452a1b

View file

@ -160,7 +160,7 @@ public class AddressBarContributionItem extends ContributionItem {
* true to enable, else false. * true to enable, else false.
*/ */
public void enableAddressBox(boolean enable) { public void enableAddressBox(boolean enable) {
if (addressBox != null) { if (addressBox != null && !item.isDisposed()) {
item.setEnabled(enable); item.setEnabled(enable);
addressBox.setEnabled(enable); addressBox.setEnabled(enable);
} }