mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 529338 - NPE in QuickFixUseDotOperator.apply()
Change-Id: I195f804e64abb77b5540d5abf0249d4de7816024
This commit is contained in:
parent
2b7188c9a5
commit
49f1411c7b
1 changed files with 5 additions and 0 deletions
|
@ -39,8 +39,13 @@ public class QuickFixUseDotOperator extends AbstractCodanCMarkerResolution {
|
|||
region = dad.find(lineOffset + columnOffset, "->", //$NON-NLS-1$
|
||||
/* forwardSearch */true, /* caseSensitive */true,
|
||||
/* wholeWord */true, /* regExSearch */false);
|
||||
if (region == null) {
|
||||
CheckersUiActivator.log("QuickFixUseDotOperator failed to find '->'"); //$NON-NLS-1$
|
||||
return;
|
||||
}
|
||||
document.replace(region.getOffset(), 2, "."); //$NON-NLS-1$
|
||||
} catch (BadLocationException e) {
|
||||
CheckersUiActivator.log(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue