mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26: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:
parent
38fd6392e2
commit
47303b4253
1 changed files with 5 additions and 0 deletions
|
@ -252,6 +252,11 @@ public class GDBMemory extends MIMemory implements IGDBMemory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isBigEndian(IMemoryDMContext context) {
|
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;
|
return fIsBigEndian;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue