From ad601c46d19c61decff635f773d5bc99f522e4d1 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sun, 29 Jul 2007 09:15:32 +0000 Subject: [PATCH] Issue #504 - Fixed crash with rotation tools if no line was available for visual typesetting. Originally committed to SVN as r1457. --- aegisub/visual_tool.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aegisub/visual_tool.cpp b/aegisub/visual_tool.cpp index 2de4e372c..08c989d44 100644 --- a/aegisub/visual_tool.cpp +++ b/aegisub/visual_tool.cpp @@ -340,6 +340,8 @@ void VisualTool::GetLinePosition(AssDialogue *diag,int &x, int &y, int &orgx, in if (!diag) { x = -1; y = -1; + orgx = -1; + orgy = -1; return; } @@ -496,6 +498,9 @@ void VisualTool::GetLineRotation(AssDialogue *diag,float &rx,float &ry,float &rz // Default values rx = ry = rz = 0.0f; + // No dialogue + if (!diag) return; + // Prepare overrides diag->ParseASSTags(); AssDialogueBlockOverride *override;