[gnome-builder] beautifier: handle NULL array of entries
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] beautifier: handle NULL array of entries
- Date: Thu, 18 Feb 2021 00:30:09 +0000 (UTC)
commit 79033c8994883971eaef946de79e500cf29e5019
Author: Christian Hergert <chergert redhat com>
Date: Wed Feb 17 16:29:53 2021 -0800
beautifier: handle NULL array of entries
Fixes #1393
src/plugins/beautifier/gb-beautifier-editor-addin.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/beautifier/gb-beautifier-editor-addin.c
b/src/plugins/beautifier/gb-beautifier-editor-addin.c
index 800660e96..722335af5 100644
--- a/src/plugins/beautifier/gb-beautifier-editor-addin.c
+++ b/src/plugins/beautifier/gb-beautifier-editor-addin.c
@@ -194,7 +194,9 @@ view_populate_submenu (GbBeautifierEditorAddin *self,
g_assert (GB_IS_BEAUTIFIER_EDITOR_ADDIN (self));
g_assert (IDE_IS_SOURCE_VIEW (view));
g_assert (G_IS_MENU (submenu));
- g_assert (entries != NULL);
+
+ if (entries == NULL)
+ return;
default_menu = dzl_application_get_menu_by_id (DZL_APPLICATION_DEFAULT, "gb-beautify-default-section");
g_menu_remove_all (default_menu);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]