Issue #504 - Fixed crash with rotation tools if no line was available for visual typesetting.

Originally committed to SVN as r1457.
This commit is contained in:
Rodrigo Braz Monteiro 2007-07-29 09:15:32 +00:00
parent c098e4d2a3
commit ad601c46d1

View file

@ -340,6 +340,8 @@ void VisualTool::GetLinePosition(AssDialogue *diag,int &x, int &y, int &orgx, in
if (!diag) { if (!diag) {
x = -1; x = -1;
y = -1; y = -1;
orgx = -1;
orgy = -1;
return; return;
} }
@ -496,6 +498,9 @@ void VisualTool::GetLineRotation(AssDialogue *diag,float &rx,float &ry,float &rz
// Default values // Default values
rx = ry = rz = 0.0f; rx = ry = rz = 0.0f;
// No dialogue
if (!diag) return;
// Prepare overrides // Prepare overrides
diag->ParseASSTags(); diag->ParseASSTags();
AssDialogueBlockOverride *override; AssDialogueBlockOverride *override;