summaryrefslogtreecommitdiff
path: root/src/modules/clist
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/clist')
-rw-r--r--src/modules/clist/cluiservices.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/clist/cluiservices.cpp b/src/modules/clist/cluiservices.cpp
index a16d5b83b6..b9bf086843 100644
--- a/src/modules/clist/cluiservices.cpp
+++ b/src/modules/clist/cluiservices.cpp
@@ -165,11 +165,12 @@ void fnCluiProtocolStatusChanged(int, const char*)
}
else {
HDC hdc;
+ HFONT hFont;
SIZE textSize;
BYTE showOpts = db_get_b(NULL, "CLUI", "SBarShow", 1);
hdc = GetDC(NULL);
- SelectObject(hdc, (HFONT) SendMessage(cli.hwndStatus, WM_GETFONT, 0, 0));
+ hFont = (HFONT)SelectObject(hdc, (HFONT) SendMessage(cli.hwndStatus, WM_GETFONT, 0, 0));
for (i=0; i < cli.menuProtoCount; i++) { //count down since built in ones tend to go at the end
int x = 2;
if (showOpts & 1)
@@ -196,6 +197,7 @@ void fnCluiProtocolStatusChanged(int, const char*)
}
partWidths[ i ] = (i ? partWidths[ i-1] : 0) + x + 2;
}
+ SelectObject(hdc, hFont);
ReleaseDC(NULL, hdc);
}