From 3bf07e8a61e42c8c7c004b72d885cb3e1c4dca71 Mon Sep 17 00:00:00 2001 From: Marc-Andre Laperle Date: Tue, 3 Sep 2013 22:14:52 -0400 Subject: [PATCH] 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 Reviewed-on: https://git.eclipse.org/r/16088 Reviewed-by: Marc Khouzam --- .../cdt/debug/ui/memory/floatingpoint/FPRendering.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java b/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java index cd4ebafc542..8c67759db13 100644 --- a/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java +++ b/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java @@ -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 * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -275,8 +275,10 @@ public class FPRendering extends AbstractMemoryRendering * the model provider. */ fModel = factory.createModelProxy(block, context); - fModel.installed(null); - fModel.addModelChangedListener(FPRendering.this); + if (fModel != null) { + fModel.installed(null); + fModel.addModelChangedListener(FPRendering.this); + } }}); }