[ghex/gtk4-port: 32/91] Fix XML error and find_dialog crash
- From: Logan Rathbone <larathbone src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex/gtk4-port: 32/91] Fix XML error and find_dialog crash
- Date: Thu, 12 Aug 2021 23:35:09 +0000 (UTC)
commit eb555a7acd9698a9897fc4c25b5ce50bf604caf3
Author: Logan Rathbone <poprocks gmail com>
Date: Thu Jan 14 02:46:40 2021 -0500
Fix XML error and find_dialog crash
src/findreplace.c | 4 +++-
src/ghex-application-window.ui | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/findreplace.c b/src/findreplace.c
index a3bc6377..162b5ddb 100644
--- a/src/findreplace.c
+++ b/src/findreplace.c
@@ -178,11 +178,12 @@ find_cancel_cb(GtkButton *button, gpointer user_data)
GtkWidget *widget = GTK_WIDGET(user_data);
g_return_if_fail (FIND_IS_DIALOG(self));
+ g_return_if_fail (GTK_IS_HEX(self->gh));
(void)button; /* unused */
if (self->auto_highlight)
- gtk_hex_delete_autohighlight(self->f_gh, self->auto_highlight);
+ gtk_hex_delete_autohighlight(self->gh, self->auto_highlight);
self->auto_highlight = NULL;
@@ -208,6 +209,7 @@ find_next_cb(GtkButton *button, gpointer user_data)
cursor_pos = gtk_hex_get_cursor(self->gh);
if ((str_len = get_search_string(self->f_doc, &str)) == 0) {
+ g_debug(_("There is no string to search for!"));
// FIXME
// display_error_dialog (self, _("There is no string to search for!"));
return;
diff --git a/src/ghex-application-window.ui b/src/ghex-application-window.ui
index 55921789..9576ac89 100644
--- a/src/ghex-application-window.ui
+++ b/src/ghex-application-window.ui
@@ -170,7 +170,7 @@
<!-- "findreplace" separator which comes and goes. -->
<child>
- <object class="GtkSeparator" -->
+ <object class="GtkSeparator">
<property name="orientation">horizontal</property>
</object>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]