Commit 90d8089
committed
Always initialize
When the OBS connection is unavailable, `_populate_source_model`
returns early without setting `self.source_model`. This causes an
`AttributeError` when `load_config_defaults` subsequently calls
`self.source_model.get_n_items()`, breaking the configuration UI.
This patch moves the `Gio.ListStore()` initialization to the top of
`_populate_source_model`, before the connection check and early
return. After this change, `load_config_defaults` sees an empty
model (zero items) and safely falls through to the `else` branch
without error.source_model in _populate_source_model
1 parent d1081e7 commit 90d8089
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
96 | | - | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments