Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] RenderManagerAdapters NullPointerException

Leigh Fitzgibbon wrote:
I just ran into this error:
Thanks; can you tell me what was going on when you got this error? My guess is you were closing the editor; and a change event fired off after the editor was closed.

I created an task to track this report:
- http://jira.codehaus.org/browse/UDIG-1345
Which is caused by the following code because the active editor is null:
Thanks: here is my patch; but I am not sure if I should commit; it may only mask a real problem. Can you tell me more about what happened to cause this error?
            public void notifyChanged( Notification msg ) {
                manager.checkState();
                switch( msg.getFeatureID(ViewportModel.class) ) {
                case RenderPackage.VIEWPORT_MODEL__BOUNDS: {
MapEditor activeEditor = ApplicationGISInternal.getActiveEditor();
                    if( activeEditor != null && activeEditor.isVisible() )
                        refreshDirtyArea(msg);
                    break;
                }
                case RenderPackage.VIEWPORT_MODEL__CRS: {
                    manager.refresh(null);
                    break;
                }
                }// switch
            }
Jody


Back to the top