Skip to content

Commit 43caf42

Browse files
author
Arthur Teplitzki
committed
mono fixes
1 parent 68da450 commit 43caf42

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Source/HtmlRenderer.WinForms/HtmlPanel.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,15 @@ protected void PerformHtmlLayout()
457457
{
458458
_htmlContainer.MaxSize = new SizeF(ClientSize.Width - Padding.Horizontal, 0);
459459

460-
using (var g = CreateGraphics())
460+
try
461461
{
462-
_htmlContainer.PerformLayout(g);
462+
using (var g = CreateGraphics())
463+
{
464+
_htmlContainer.PerformLayout(g);
465+
}
463466
}
467+
catch
468+
{ }
464469

465470
AutoScrollMinSize = Size.Round(new SizeF(_htmlContainer.ActualSize.Width + Padding.Horizontal, _htmlContainer.ActualSize.Height));
466471
}
@@ -676,8 +681,13 @@ protected virtual void UpdateScroll(Point location)
676681
/// </summary>
677682
protected virtual void InvokeMouseMove()
678683
{
679-
var mp = PointToClient(MousePosition);
680-
_htmlContainer.HandleMouseMove(this, new MouseEventArgs(MouseButtons.None, 0, mp.X, mp.Y, 0));
684+
try
685+
{
686+
var mp = PointToClient(MousePosition);
687+
_htmlContainer.HandleMouseMove(this, new MouseEventArgs(MouseButtons.None, 0, mp.X, mp.Y, 0));
688+
}
689+
catch
690+
{ }
681691
}
682692

683693
/// <summary>

0 commit comments

Comments
 (0)