From: jstebbins Date: Fri, 17 Apr 2009 18:06:27 +0000 (+0000) Subject: LinGui: fix segfault on startup for older fedora versions X-Git-Tag: 0.9.4~624 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2776908045cff478bc3d3269978c9c193be8bc1d;p=handbrake LinGui: fix segfault on startup for older fedora versions multiple drive change events caused multiple source scans to be started git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2338 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index e2b8c3c40..5fc55f410 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -2972,14 +2972,17 @@ wm_drive_changed(MSG *msg, signal_user_data_t *ud) G_MODULE_EXPORT void drive_changed_cb(GVolumeMonitor *gvm, GDrive *gd, signal_user_data_t *ud) { + gchar *device; + gint state; + g_debug("drive_changed_cb()"); ghb_file_menu_add_dvd(ud); - gchar *device; - + state = ghb_get_scan_state(); device = g_drive_get_identifier(gd, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE); if (ud->current_dvd_device == NULL || - strcmp(device, ud->current_dvd_device) != 0) + strcmp(device, ud->current_dvd_device) != 0 || + state != GHB_STATE_IDLE ) { return; }