Commit dc2b6940 authored by Adrian Boguszewski's avatar Adrian Boguszewski Committed by Nathan Lee

Stop crash with Menu button on empty canvas

Fixes inbox#400

Cherry picked from commit e00452a7
parent f29ffcbb
Pipeline #58144476 passed with stages
in 8 minutes and 1 second
......@@ -1085,7 +1085,7 @@ void sp_event_root_menu_popup(SPDesktop *desktop, SPItem *item, GdkEvent *event)
Geom::Point(event->button.x, event->button.y), FALSE, FALSE);
/* fixme: This is not what I want but works for now (Lauris) */
if (event->type == GDK_KEY_PRESS) {
if (event->type == GDK_KEY_PRESS && !desktop->getSelection()->isEmpty()) {
item = desktop->getSelection()->itemList().front();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment