diff --git a/SharpDXTutorial/TutorialD1/Form1.cs b/SharpDXTutorial/TutorialD1/Form1.cs index 914c7dd..1e9878e 100644 --- a/SharpDXTutorial/TutorialD1/Form1.cs +++ b/SharpDXTutorial/TutorialD1/Form1.cs @@ -132,7 +132,7 @@ private void Draw() private void Form1_Resize(object sender, EventArgs e) { //resize target - target.Resize(new Size2(this.ClientSize.Width, this.ClientSize.Height)); + target?.Resize(new Size2(this.ClientSize.Width, this.ClientSize.Height)); } private void Form1_FormClosing(object sender, FormClosingEventArgs e)