Skip to content
Permalink
Browse files

zoom-control: use NULL instead of uninitialized variable

  • Loading branch information...
monsta committed May 16, 2018
1 parent 13fe58e commit 9bf65eef92d7753a6be904fab41bb076697a4a87
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/caja-zoom-control.c
@@ -140,14 +140,13 @@ static void
zoom_popup_menu (GtkWidget *widget, CajaZoomControl *zoom_control)
{
GtkMenu *menu;
GdkEvent *event;

menu = create_zoom_menu (zoom_control);
gtk_menu_popup_at_widget (menu,
widget,
GDK_GRAVITY_SOUTH_WEST,
GDK_GRAVITY_NORTH_WEST,
(const GdkEvent*) event);
NULL);

gtk_menu_shell_select_first (GTK_MENU_SHELL (menu), FALSE);
}

2 comments on commit 9bf65ee

@raveit65

This comment has been minimized.

Copy link
Member

replied May 17, 2018

Indeed, there is a build warning about, still wondering that i missed that.
Thx.

@lukefromdc

This comment has been minimized.

Copy link
Member

replied May 17, 2018

I see what happened here: event is not imported into the function, so it cannot be used and NULL is required. In this case the right-click remains responsive and the popup is easily invoked

Please sign in to comment.
You can’t perform that action at this time.