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:
parent
82409f57c0
commit
91d183efc2
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue