diff --git a/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserDeviceAdder.cpp b/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserDeviceAdder.cpp index 1c4d5f9b8250..48b75cab5ebf 100644 --- a/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserDeviceAdder.cpp +++ b/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserDeviceAdder.cpp @@ -300,7 +300,6 @@ FString SDeviceBrowserDeviceAdder::HandlePlatformComboBoxContentText( ) const TSharedRef SDeviceBrowserDeviceAdder::HandlePlatformComboBoxGenerateWidget( TSharedPtr Item ) { const PlatformInfo::FPlatformInfo* const PlatformInfo = PlatformInfo::FindPlatformInfo(**Item); - check(PlatformInfo); return SNew(SHorizontalBox) @@ -309,8 +308,13 @@ TSharedRef SDeviceBrowserDeviceAdder::HandlePlatformComboBoxGenerateWid .AutoWidth() .HAlign(HAlign_Left) [ - SNew(SImage) - .Image(FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal))) + SNew(SBox) + .WidthOverride(24) + .HeightOverride(24) + [ + SNew(SImage) + .Image((PlatformInfo) ? FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal)) : FStyleDefaults::GetNoBrush()) + ] ] + SHorizontalBox::Slot() diff --git a/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserDeviceListRow.h b/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserDeviceListRow.h index 3d1595107228..bfb67135b278 100644 --- a/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserDeviceListRow.h +++ b/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserDeviceListRow.h @@ -62,13 +62,14 @@ public: else if (ColumnName == TEXT("Icon")) { const PlatformInfo::FPlatformInfo* const PlatformInfo = PlatformInfo::FindPlatformInfo(*DeviceService->GetDeviceId().GetPlatformName()); - check(PlatformInfo); return SNew(SBox) .Padding(FMargin(4.0f, 0.0f)) + .WidthOverride(24) + .HeightOverride(24) [ SNew(SImage) - .Image(FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal))) + .Image((PlatformInfo) ? FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal)) : FStyleDefaults::GetNoBrush()) ]; } else if (ColumnName == TEXT("Name")) diff --git a/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserFilterBar.cpp b/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserFilterBar.cpp index e253e55edf97..cc27bdb69ef7 100644 --- a/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserFilterBar.cpp +++ b/Engine/Source/Developer/DeviceManager/Private/Widgets/Browser/SDeviceBrowserFilterBar.cpp @@ -110,7 +110,6 @@ BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION TSharedRef SDeviceBrowserFilterBar::HandlePlatformListViewGenerateRow( TSharedPtr PlatformName, const TSharedRef& OwnerTable ) { const PlatformInfo::FPlatformInfo* const PlatformInfo = PlatformInfo::FindPlatformInfo(**PlatformName); - check(PlatformInfo); return SNew(STableRow >, OwnerTable) .Content() @@ -126,8 +125,13 @@ TSharedRef SDeviceBrowserFilterBar::HandlePlatformListViewGenerateRow + SHorizontalBox::Slot() .AutoWidth() [ - SNew(SImage) - .Image(FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal))) + SNew(SBox) + .WidthOverride(24) + .HeightOverride(24) + [ + SNew(SImage) + .Image((PlatformInfo) ? FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal)) : FStyleDefaults::GetNoBrush()) + ] ] + SHorizontalBox::Slot() diff --git a/Engine/Source/Developer/DeviceManager/Private/Widgets/Shared/SDeviceQuickInfo.h b/Engine/Source/Developer/DeviceManager/Private/Widgets/Shared/SDeviceQuickInfo.h index 61e44ba0953a..cf9616b46f69 100644 --- a/Engine/Source/Developer/DeviceManager/Private/Widgets/Shared/SDeviceQuickInfo.h +++ b/Engine/Source/Developer/DeviceManager/Private/Widgets/Shared/SDeviceQuickInfo.h @@ -242,12 +242,13 @@ private: if (DeviceService.IsValid()) { const PlatformInfo::FPlatformInfo* const PlatformInfo = PlatformInfo::FindPlatformInfo(*DeviceService->GetDeviceId().GetPlatformName()); - check(PlatformInfo); - - return FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::XLarge)); + if(PlatformInfo) + { + return FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::XLarge)); + } } - return NULL; + return FStyleDefaults::GetNoBrush(); } // Callback for getting the name of the device's platform. diff --git a/Engine/Source/Developer/SessionFrontend/Private/Widgets/Browser/SSessionBrowserInstanceListRow.h b/Engine/Source/Developer/SessionFrontend/Private/Widgets/Browser/SSessionBrowserInstanceListRow.h index 8f7d61edd463..498502c9f5a9 100644 --- a/Engine/Source/Developer/SessionFrontend/Private/Widgets/Browser/SSessionBrowserInstanceListRow.h +++ b/Engine/Source/Developer/SessionFrontend/Private/Widgets/Browser/SSessionBrowserInstanceListRow.h @@ -95,7 +95,6 @@ public: else if (ColumnName == "Platform") { const PlatformInfo::FPlatformInfo* const PlatformInfo = PlatformInfo::FindPlatformInfo(*InstanceInfo->GetPlatformName()); - check(PlatformInfo); return SNew(SHorizontalBox) @@ -103,8 +102,13 @@ public: .AutoWidth() .VAlign(VAlign_Center) [ - SNew(SImage) - .Image(FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal))) + SNew(SBox) + .WidthOverride(24) + .HeightOverride(24) + [ + SNew(SImage) + .Image((PlatformInfo) ? FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal)) : FStyleDefaults::GetNoBrush()) + ] ] + SHorizontalBox::Slot() diff --git a/Engine/Source/Developer/SessionLauncher/Private/Widgets/Deploy/SSessionLauncherDeviceListRow.h b/Engine/Source/Developer/SessionLauncher/Private/Widgets/Deploy/SSessionLauncherDeviceListRow.h index 0f1d9f577e19..51807450165e 100644 --- a/Engine/Source/Developer/SessionLauncher/Private/Widgets/Deploy/SSessionLauncherDeviceListRow.h +++ b/Engine/Source/Developer/SessionLauncher/Private/Widgets/Deploy/SSessionLauncherDeviceListRow.h @@ -75,8 +75,13 @@ public: + SHorizontalBox::Slot() .AutoWidth() [ - SNew(SImage) - .Image(this, &SSessionLauncherDeviceListRow::HandleDeviceImage) + SNew(SBox) + .WidthOverride(24) + .HeightOverride(24) + [ + SNew(SImage) + .Image(this, &SSessionLauncherDeviceListRow::HandleDeviceImage) + ] ] + SHorizontalBox::Slot() @@ -165,13 +170,7 @@ private: const FSlateBrush* HandleDeviceImage( ) const { const PlatformInfo::FPlatformInfo* const PlatformInfo = PlatformInfo::FindPlatformInfo(*DeviceProxy->GetPlatformName()); - - if (PlatformInfo == nullptr) - { - return nullptr; - } - - return FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal)); + return (PlatformInfo) ? FEditorStyle::GetBrush(PlatformInfo->GetIconStyleName(PlatformInfo::EPlatformIconSize::Normal)) : FStyleDefaults::GetNoBrush(); } // Callback for getting the friendly name.