Gallery : NullPointerException at clearAll() [message #48635] |
Tue, 05 February 2008 13:37 |
Eclipse User |
|
|
|
Originally posted by: tkotisis.urbantech.gr
Using the GalleryTreeViewer, trying to call setInput(Object) with a new =
=
Object, throws a NullPointerException.
The critical part is the following :
public void clearAll() {
checkWidget();
if (items !=3D null) {
// Clear items
for (int i =3D 0; i < items.length; i++) {
// Dispose items if not virtual
if (!virtual) {
if (items[i] !=3D null) {
// TODO: send a dispose event
items[i].dispose();
}
}
// Empty item
items[i] =3D null;
}
}
// Free array if not virtual
if (!virtual) {
items =3D null;
}
// TODO: I'm clearing selection here
// but we have to check that Table has the same behavior
this._deselectAll();
updateStructuralValues(false);
updateScrollBarsProperties();
redraw();
}
items[i] is disposed, and is then assigned to null, which throws the =
Exception.
-- =
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05344 seconds