1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-30 03:33:37 +02:00

[187713] Rupen's patch for checking to see if target is null

This commit is contained in:
David McKnight 2007-06-29 14:30:28 +00:00
parent ea0c061e2c
commit 2eeda90ebc

View file

@ -13,6 +13,7 @@
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
* Rupen Mardirossian (IBM) - [187713] Check to see if target is null before attempting to retrieve targetAdapter in tranferRSEResources method (line 248)
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -244,8 +245,14 @@ public class SystemDNDTransferRunnable extends WorkspaceJob
if (factory.supportsDropInFilters()) if (factory.supportsDropInFilters())
{ {
target = targetSubSystem.getTargetForFilter((ISystemFilterReference)target); target = targetSubSystem.getTargetForFilter((ISystemFilterReference)target);
targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class); if (target == null)
{
return false;
}
else
{
targetAdapter = (ISystemDragDropAdapter) ((IAdaptable) target).getAdapter(ISystemDragDropAdapter.class);
}
} }
} }
if (targetAdapter.validateDrop(set, target, (targetSubSystem == srcSubSystem))) if (targetAdapter.validateDrop(set, target, (targetSubSystem == srcSubSystem)))