summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.m
diff options
context:
space:
mode:
authordynaflash <[email protected]>2009-10-08 17:41:15 +0000
committerdynaflash <[email protected]>2009-10-08 17:41:15 +0000
commit23b33caa37d903d099502217cfe573a9d2fb26fa (patch)
tree7da451a0c985c1740041cff43d97f777d43e3f9b /macosx/Controller.m
parent70df288401ba5b0deee12f2e48d77d247ea2ebda (diff)
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
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r--macosx/Controller.m5
1 files changed, 5 insertions, 0 deletions
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)