fix crash

This commit is contained in:
bluepilledgreat 2024-10-20 19:16:08 +01:00
parent eb4eda5029
commit 6e043ed12b
2 changed files with 6 additions and 2 deletions

View File

@ -89,7 +89,7 @@
"Attributes": { "Attributes": {
"Stretch": "Stretch", "Stretch": "Stretch",
"StretchDirection": "StretchDirection", "StretchDirection": "StretchDirection",
"Source": "string", "Source": "ImageSource",
"IsAnimated": "bool" "IsAnimated": "bool"
} }
}, },
@ -138,7 +138,7 @@
"ViewportUnits": "BrushMappingMode", "ViewportUnits": "BrushMappingMode",
"Viewbox": "Rect", "Viewbox": "Rect",
"Viewport": "Rect", "Viewport": "Rect",
"ImageSource": "Source" "ImageSource": "ImageSource"
} }
} }
}, },
@ -156,6 +156,7 @@
"Rect": {}, "Rect": {},
"Brush": {}, "Brush": {},
"Content": {}, "Content": {},
"ImageSource": {},
"Visibility": { "Visibility": {
"Values": [ "Values": [
"Visible", "Visible",

View File

@ -328,6 +328,9 @@ namespace Bloxstrap.UI.Elements.Editor
private void OpenTypeValueAutoComplete(string typeName) private void OpenTypeValueAutoComplete(string typeName)
{ {
if (CustomBootstrapperSchema.Types.ContainsKey(typeName))
throw new Exception($"Schema for type {typeName} is missing. Blame Matt!");
var typeValues = CustomBootstrapperSchema.Types[typeName].Values; var typeValues = CustomBootstrapperSchema.Types[typeName].Values;
if (typeValues == null) if (typeValues == null)
return; return;