aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2013-07-26 10:06:13 (EDT)
committerDirk Fauth2013-07-26 10:06:13 (EDT)
commit96afad5f907f3f9b17bf1d363f22ad15a7ae215e (patch)
tree0a9cb6fa9f1f4cc2bbad4b05ed07a697c32c666f
parent9bde3dd93aaec31dbc272f8ca31ddfc16a1f2ea8 (diff)
downloadorg.eclipse.nebula-96afad5f907f3f9b17bf1d363f22ad15a7ae215e.zip
org.eclipse.nebula-96afad5f907f3f9b17bf1d363f22ad15a7ae215e.tar.gz
org.eclipse.nebula-96afad5f907f3f9b17bf1d363f22ad15a7ae215e.tar.bz2
Bug 413817 - Added check for _mainBounds to avoid NPE in
showScrollDate()
-rw-r--r--widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java
index 247dc9f..23757fe 100644
--- a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java
+++ b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java
@@ -951,7 +951,8 @@ public final class GanttComposite extends Canvas implements MouseListener, Mouse
// horizontal scrollbar info
void showScrollDate() {
- if (_settings.showDateTips() && _settings.showDateTipsOnScrolling()) {
+ if (_settings.showDateTips() && _settings.showDateTipsOnScrolling()
+ && _mainBounds != null /* security question as in some unknown cases the _mainBounds is null */) {
final String str = DateHelper.getDate(_mainCalendar, _currentView == ISettings.VIEW_DAY ? _settings.getHourDateFormat() : _settings.getDateFormat());
final GC gc = new GC(this);
final Point ext = gc.stringExtent(str);