1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 413483 - Protect agains NPE if endianness is not initialized

Change-Id: I8d21ccf3d45bb45bca4bfdc7c24ada0c21335f4b
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/16507
This commit is contained in:
Marc Khouzam 2013-09-17 10:40:22 -04:00
parent 38fd6392e2
commit 47303b4253

View file

@ -252,6 +252,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;
}