1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-19 14:15:50 +02:00

Bug 413483 - Protect agains NPE if endianness is not initialized

Change-Id: I8ab096dacb9d2fcf0d261dd082fa0fdc84485219
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Marc Khouzam 2013-09-17 10:52:36 -04:00
parent 82409f57c0
commit 91d183efc2

View file

@ -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;
}