Event handling best practice

Also make consistent
This commit is contained in:
amaitland
2014-11-18 13:03:53 +10:00
parent 1b614310fd
commit 8b45904fa7
+5 -2
View File
@@ -355,8 +355,11 @@ namespace CefSharp.Offscreen
bitmap = BitmapSourceToBitmap2(Imaging.CreateBitmapSourceFromMemorySection(bitmapInfo.FileMappingHandle,
bitmapInfo.Width, bitmapInfo.Height, PixelFormats.Bgra32, stride, 0));
if (NewScreenshot != null)
NewScreenshot(this, EventArgs.Empty);
var handler = NewScreenshot;
if (handler != null)
{
handler(this, EventArgs.Empty);
}
}
}
}