diff options
| author | Nebelung, Hartmut <[email protected]> | 2016-09-23 10:36:00 +0200 |
|---|---|---|
| committer | Nebelung, Hartmut <[email protected]> | 2016-09-23 10:36:00 +0200 |
| commit | 965839e1d397869c402c983db49a2707d511501a (patch) | |
| tree | 937ec94f295fb7acfa3690267d9282b050826b7e | |
| parent | aa6e0b36eb932099fa4eb950a6f5e289a23b6d6e (diff) | |
Fix DisplayConnectionInfo
Display the connection info correctly even if the ConnectionInfoV2 is not
present.
| -rw-r--r-- | usb/usbview/display.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usb/usbview/display.c b/usb/usbview/display.c index 3191d97f..318772be 100644 --- a/usb/usbview/display.c +++ b/usb/usbview/display.c @@ -1404,10 +1404,17 @@ DisplayConnectionInfo ( case UsbSuperSpeed: if(gDoAnnotation) { - AppendTextBuffer(" -> Device Bus Speed: Super%s\r\n", - ConnectionInfoV2->Flags.DeviceIsOperatingAtSuperSpeedPlusOrHigher - ? "SpeedPlus" - : "Speed"); + if (ConnectionInfoV2 != NULL) + { + AppendTextBuffer(" -> Device Bus Speed: Super%s\r\n", + ConnectionInfoV2->Flags.DeviceIsOperatingAtSuperSpeedPlusOrHigher + ? "SpeedPlus" + : "Speed"); + } + else + { + AppendTextBuffer(" -> Device Bus Speed: Super Speed\r\n"); + } } else { |
