+ // Handle the special case of not initialized (e.g. default constructed)
+ // region as we can't use HIShape functions if we don't have any shape.
+ if ( !m_refData )
+ {
+ switch ( op )
+ {
+ case wxRGN_COPY:
+ case wxRGN_OR:
+ case wxRGN_XOR:
+ // These operations make sense with a null region.
+ *this = region;
+ return true;
+
+ case wxRGN_AND:
+ case wxRGN_DIFF:
+ // Those ones don't really make sense so just leave this region
+ // empty/invalid.
+ return false;
+ }
+
+ wxFAIL_MSG( wxT("Unknown region operation") );
+ return false;
+ }
+