diff options
author | sr55 <[email protected]> | 2009-12-19 21:15:38 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-12-19 21:15:38 +0000 |
commit | 27c6623510a6b1b64e0a229140c2323fe8dc52e5 (patch) | |
tree | d73b466ff1af6290eed22eab2ddd99967effeff4 /win/C#/Controls/PictureSettings.cs | |
parent | 1529c129b8765a0acf342da91d67cb99c743dc6a (diff) |
WinGui:
- Fix a crash when a preset with crop values is selected before the first source is scanned.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3037 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Controls/PictureSettings.cs')
-rw-r--r-- | win/C#/Controls/PictureSettings.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs index bbca24dc1..d46efb8f2 100644 --- a/win/C#/Controls/PictureSettings.cs +++ b/win/C#/Controls/PictureSettings.cs @@ -380,10 +380,13 @@ namespace Handbrake.Controls crop_left.Enabled = check_customCrop.Checked;
crop_right.Enabled = check_customCrop.Checked;
- crop_top.Value = Source.AutoCropDimensions[0];
- crop_bottom.Value = Source.AutoCropDimensions[1];
- crop_left.Value = Source.AutoCropDimensions[2];
- crop_right.Value = Source.AutoCropDimensions[3];
+ if (Source != null)
+ {
+ crop_top.Value = Source.AutoCropDimensions[0];
+ crop_bottom.Value = Source.AutoCropDimensions[1];
+ crop_left.Value = Source.AutoCropDimensions[2];
+ crop_right.Value = Source.AutoCropDimensions[3];
+ }
}
private void crop_ValueChanged(object sender, EventArgs e)
{
@@ -507,5 +510,6 @@ namespace Handbrake.Controls if (PictureSettingsChanged != null)
PictureSettingsChanged(this, new EventArgs());
}
+
}
}
\ No newline at end of file |