Bug 214126 - Null Pointer Exception caused by the GraphicalViewerImpl
Summary: Null Pointer Exception caused by the GraphicalViewerImpl
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3.2 (Europa SR2)   Edit
Assignee: Mohammed Mostafa CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 210204 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-02 11:27 EST by Mohammed Mostafa CLA
Modified: 2008-09-18 13:48 EDT (History)
2 users (show)

See Also:


Attachments
patch (1.24 KB, patch)
2008-01-02 13:51 EST, Mohammed Mostafa CLA
ahunter.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammed Mostafa CLA 2008-01-02 11:27:48 EST
The implementation of registerAccessibleEditPart and unregisterAccessibleEditPart uses the return of getEventDispatcher without checking if it is null or not

This cause null pointer exception in some cases, for example is my edit part classes return an accessible edit part and i'm hosting them in a viewer that had no editDomain set on it (the set edit domain method had not been called on the Viewer instance). Then we will get a null pointer exception

this should be a trivial change to just add the null value check in both methods before calling removeAccessible and putAccessible
Comment 1 Anthony Hunter CLA 2008-01-02 13:12:42 EST
Can you create a quick patch for this issue?
Comment 2 Mohammed Mostafa CLA 2008-01-02 13:51:54 EST
Created attachment 86012 [details]
patch
Comment 3 Anthony Hunter CLA 2008-01-02 14:16:54 EST
Committed the patch to HEAD.
Comment 4 Mohammed Mostafa CLA 2008-01-15 16:56:35 EST
*** Bug 210204 has been marked as a duplicate of this bug. ***
Comment 5 Anthony Hunter CLA 2008-01-16 13:09:10 EST
Also committed to R33_Maintenance