From 23b33caa37d903d099502217cfe573a9d2fb26fa Mon Sep 17 00:00:00 2001 From: dynaflash Date: Thu, 8 Oct 2009 17:41:15 +0000 Subject: MacGui: Do not allow Start or Add to Queue during source scanning. - Avoids a crash when trying to add to queue or start during a scan. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2874 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/macosx/Controller.m b/macosx/Controller.m index cd0ef7342..df7616550 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1098,6 +1098,11 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It if (fHandle) { hb_state_t s; + + hb_get_state( fHandle, &s ); + if (s.state == HB_STATE_SCANNING && ([ident isEqualToString: StartEncodingIdentifier] || [ident isEqualToString: AddToQueueIdentifier])) + return NO; + hb_get_state2( fQueueEncodeLibhb, &s ); if (s.state == HB_STATE_WORKING || s.state == HB_STATE_MUXING) -- cgit v1.2.3