[PATCH] wrc: Don't crash when parsing COMBOBOX element without style

Fabian Maurer dark.shadow4 at web.de
Fri Jul 20 10:33:12 CDT 2018


Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
 tools/wrc/parser.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y
index 0f73f906b6..8196e9f7fa 100644
--- a/tools/wrc/parser.y
+++ b/tools/wrc/parser.y
@@ -1969,7 +1969,7 @@ static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control
 		defaultstyle |= LBS_NOTIFY | WS_BORDER;
 		break;
 	case CT_COMBOBOX:
-                if (!(ctrl->style->or_mask & (CBS_SIMPLE | CBS_DROPDOWN | CBS_DROPDOWNLIST)))
+                if (!ctrl->gotstyle || !(ctrl->style->or_mask & (CBS_SIMPLE | CBS_DROPDOWN | CBS_DROPDOWNLIST)))
                     defaultstyle |= CBS_SIMPLE;
 		break;
 	case CT_STATIC:
-- 
2.18.0




More information about the wine-devel mailing list