X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a6b6a98895b14b5edf1aab8d258e306ab764977..615f68c6b9fb887d2cfcbc6a3c6c3716a34a914e:/samples/widgets/static.cpp

diff --git a/samples/widgets/static.cpp b/samples/widgets/static.cpp
index 65dd5e4c61..58a2d0610e 100644
--- a/samples/widgets/static.cpp
+++ b/samples/widgets/static.cpp
@@ -41,6 +41,7 @@
 
 #include "wx/statline.h"
 #include "wx/generic/stattextg.h"
+#include "wx/wupdlock.h"
 
 #include "widgets.h"
 #include "icons/statbox.xpm"
@@ -376,6 +377,8 @@ void StaticWidgetsPage::Reset()
 
 void StaticWidgetsPage::CreateStatic()
 {
+    wxWindowUpdateLocker lock(this);
+
     bool isVert = m_chkVert->GetValue();
 
     if ( m_sizerStatBox )