Fixed the bug in ToolBar::getTotalWidth() method.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2220 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/win/rfb_win32/ToolBar.cxx b/win/rfb_win32/ToolBar.cxx
index 857db45..1bbba30 100644
--- a/win/rfb_win32/ToolBar.cxx
+++ b/win/rfb_win32/ToolBar.cxx
@@ -203,9 +203,9 @@
}
int ToolBar::getTotalWidth() {
- SIZE *size;
- SendMessage(getHandle(), TB_GETMAXSIZE, 0, (LPARAM)&size);
- return size->cx;
+ SIZE size;
+ SendMessage(getHandle(), TB_GETMAXSIZE, 0, (LPARAM)(LPSIZE)&size);
+ return size.cx;
}
void ToolBar::show() {