summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-04-17 18:06:27 +0000
committerjstebbins <[email protected]>2009-04-17 18:06:27 +0000
commit2776908045cff478bc3d3269978c9c193be8bc1d (patch)
treeed13d2153684cef3ab77e8cdd4cf4546600388bf
parent6f64e12f82fd851dc630bd5d55a6954efac20e5b (diff)
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
-rw-r--r--gtk/src/callbacks.c9
1 files changed, 6 insertions, 3 deletions
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;
}