Fix crash in language server

This commit is contained in:
James Westman 2022-10-15 11:47:42 -05:00
parent b3783b9c6a
commit 8cf793023d
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
2 changed files with 4 additions and 2 deletions

View file

@ -45,7 +45,8 @@ class UI(AstNode):
self._gir_errors = []
try:
gir_ctx.add_namespace(self.children[GtkDirective][0].gir_namespace)
if gtk := self.children[GtkDirective][0].gir_namespace:
gir_ctx.add_namespace(gtk)
except CompileError as e:
self._gir_errors.append(e)