Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2013-09-17 10:52:36 -0400
committerMarc Khouzam2013-09-17 10:53:34 -0400
commit91d183efc2a77a6efc1bbe6129a00f7254a7dca8 (patch)
tree2d6cb64b4359a5958b2009e1f312b4e4640e76c1
parent82409f57c0cce9be3946b7d9d233d265d279d52f (diff)
downloadorg.eclipse.cdt-91d183efc2a77a6efc1bbe6129a00f7254a7dca8.tar.gz
org.eclipse.cdt-91d183efc2a77a6efc1bbe6129a00f7254a7dca8.tar.xz
org.eclipse.cdt-91d183efc2a77a6efc1bbe6129a00f7254a7dca8.zip
Bug 413483 - Protect agains NPE if endianness is not initializedCDT_8_2_1
Change-Id: I8ab096dacb9d2fcf0d261dd082fa0fdc84485219 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java
index 9795f8553d..82c0914934 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java
@@ -194,6 +194,11 @@ public class GDBMemory extends MIMemory implements IGDBMemory {
@Override
public boolean isBigEndian(IMemoryDMContext context) {
+ assert fIsBigEndian != null;
+ if (fIsBigEndian == null) {
+ GdbPlugin.log(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, "Endianness was never initialized!")); //$NON-NLS-1$
+ return false;
+ }
return fIsBigEndian;
}

Back to the top