Merge lp:~junrrein/midori/fix-1215652 into lp:midori

Proposed by Julián Unrrein
Status: Merged
Approved by: Cris Dywan
Approved revision: 6360
Merged at revision: 6367
Proposed branch: lp:~junrrein/midori/fix-1215652
Merge into: lp:midori
Diff against target: 12 lines (+2/-0)
1 file modified
midori/midori-view.c (+2/-0)
To merge this branch: bzr merge lp:~junrrein/midori/fix-1215652
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+181954@code.launchpad.net

Commit message

Check if browser is NULL in midori_view_get_tab_menu to prevent a crash. Fixes bug #1215652.

Description of the change

Check if browser is NULL in midori_view_get_tab_menu to prevent a crash. Fixes bug #1215652.

This prevents midori-granite from crashing when a tab is closed while it is still loading.

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

This is not a genuine crash "fix" in any shape or form - it's an extra check to bail out if something's wrong when reaching that code. It definitely is a good idea, but I will unlike it from the bug because it doesn't resolve whatever actually went wrong.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-view.c'
2--- midori/midori-view.c 2013-08-15 11:55:34 +0000
3+++ midori/midori-view.c 2013-08-24 12:22:24 +0000
4@@ -4398,6 +4398,8 @@
5 g_return_val_if_fail (MIDORI_IS_VIEW (view), NULL);
6
7 MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (view));
8+ g_return_val_if_fail (browser != NULL, NULL);
9+
10 GtkActionGroup* actions = midori_browser_get_action_group (browser);
11 MidoriContextAction* menu = midori_context_action_new ("TabContextMenu", NULL, NULL, NULL);
12 midori_context_action_add_action_group (menu, actions);

Subscribers

People subscribed via source and target branches

to all changes: