diff --git a/app/ui/sql_editor.py b/app/ui/sql_editor.py index 40cf5e2..8fb0691 100644 --- a/app/ui/sql_editor.py +++ b/app/ui/sql_editor.py @@ -527,6 +527,9 @@ class EditorTab(QWidget): self._stop_btn.setEnabled(False) def _explain(self): + if not self._driver: + self._results.show_error("No active connection. Connect to a database first.") + return sql = self._editor.selected_or_all().strip() if not sql: return