[gtranslator: 15/20] window: Fix crash on pressing ESC
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator: 15/20] window: Fix crash on pressing ESC
- Date: Sun, 6 Mar 2022 12:34:49 +0000 (UTC)
commit 1321632de030c4fa296250b4100234acee078eb8
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Sat Mar 5 14:57:07 2022 +0100
window: Fix crash on pressing ESC
When pressing esc while in the dialog created by "Open From DL...",
gtr_tab_show_hide_search_bar (tab, show) would crash as tab is NULL.
src/gtr-window.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/gtr-window.c b/src/gtr-window.c
index ece9c045..6be75f41 100644
--- a/src/gtr-window.c
+++ b/src/gtr-window.c
@@ -921,7 +921,9 @@ gtr_window_show_search_bar (GtrWindow *window,
GtrNotebook *notebook = GTR_NOTEBOOK (priv->notebook);
GtrTab *tab = gtr_window_get_active_tab (window);
- gtr_tab_show_hide_search_bar (tab, show);
+ if (tab != NULL)
+ gtr_tab_show_hide_search_bar (tab, show);
+
gtr_notebook_enable_find_button(notebook, show);
priv->search_bar_shown = show;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]