File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3063,6 +3063,10 @@ void SubstGenericParametersFromMetadata::setup() const {
3063
3063
MetadataOrPack
3064
3064
SubstGenericParametersFromMetadata::getMetadata (
3065
3065
unsigned depth, unsigned index) const {
3066
+ // Don't attempt anything if we have no generic parameters.
3067
+ if (genericArgs == nullptr )
3068
+ return MetadataOrPack ();
3069
+
3066
3070
// On first access, compute the descriptor path.
3067
3071
setup ();
3068
3072
@@ -3104,6 +3108,10 @@ SubstGenericParametersFromMetadata::getMetadata(
3104
3108
const WitnessTable *
3105
3109
SubstGenericParametersFromMetadata::getWitnessTable (const Metadata *type,
3106
3110
unsigned index) const {
3111
+ // Don't attempt anything if we have no generic parameters.
3112
+ if (genericArgs == nullptr )
3113
+ return nullptr ;
3114
+
3107
3115
// On first access, compute the descriptor path.
3108
3116
setup ();
3109
3117
You can’t perform that action at this time.
0 commit comments