[rhythmbox] import-dialog: don't crash if there are no entries to import



commit 027dcae259afb335905e60f061ecb51f108b6aa6
Author: vrishab <vrishab in gmail com>
Date:   Tue Sep 6 22:27:39 2016 +1000

    import-dialog: don't crash if there are no entries to import
    
    The import button should be insensitive in this case, but there
    appears to be a small window for this to happen.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770920

 widgets/rb-import-dialog.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/widgets/rb-import-dialog.c b/widgets/rb-import-dialog.c
index ac8f0a5..5a1fc2b 100644
--- a/widgets/rb-import-dialog.c
+++ b/widgets/rb-import-dialog.c
@@ -284,6 +284,8 @@ import_clicked_cb (GtkButton *button, RBImportDialog *dialog)
        RBTrackTransferBatch *batch;
 
        entries = get_entries (dialog);
+       if (entries == NULL)
+               return;
 
        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->copy_check)) == FALSE) {
                dialog->priv->add_entry_list = g_list_concat (dialog->priv->add_entry_list, entries);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]