mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-09-19 07:41:26 +00:00
window-slot: Don’t show query editor with no view
Since the view can be null at the time the user is pressing keys, doing anything with it may lead to a crash.
This commit is contained in:
parent
a5dc2cc501
commit
fddcda2d96
|
@ -509,6 +509,10 @@ show_query_editor (NautilusWindowSlot *self)
|
|||
|
||||
priv = nautilus_window_slot_get_instance_private (self);
|
||||
view = nautilus_window_slot_get_current_view (self);
|
||||
if (view == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (nautilus_view_is_searching (view))
|
||||
{
|
||||
|
@ -2782,8 +2786,6 @@ nautilus_window_slot_dispose (GObject *object)
|
|||
|
||||
nautilus_window_slot_remove_extra_location_widgets (self);
|
||||
|
||||
nautilus_window_slot_set_active (self, FALSE);
|
||||
|
||||
if (priv->content_view)
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (priv->content_view));
|
||||
|
|
Loading…
Reference in a new issue