1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 20:05:35 +02:00

Bug 416391 - NullPointerException in FPRendering when adding in Mem view

Add null check. IModelProxyFactory.createModelProxy javadoc says
"Returns: model proxy or null". So a null check seems appropriate here.

Change-Id: I0d1ae4ca380c22d4f215b867d0ab5445b415a915
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
This commit is contained in:
Marc-Andre Laperle 2013-09-03 22:14:52 -04:00
parent 02393d61f1
commit 7e481e1333

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2010, 2012 Wind River Systems, Inc. and others. * Copyright (c) 2006, 2010, 2013 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -275,8 +275,10 @@ public class FPRendering extends AbstractMemoryRendering
* the model provider. * the model provider.
*/ */
fModel = factory.createModelProxy(block, context); fModel = factory.createModelProxy(block, context);
fModel.installed(null); if (fModel != null) {
fModel.addModelChangedListener(FPRendering.this); fModel.installed(null);
fModel.addModelChangedListener(FPRendering.this);
}
}}); }});
} }