aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-19 17:26:24 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-19 17:26:24 +0200
commitff53b8efce55f5668af61f13b656fdb54dee7755 (patch)
tree3b5802f9a1ac2b5bc7b32578528659a70c4c1b4c /c/episodelistview.cpp
parent0635058400597e43d698c87caf3d3ca4f802e0bd (diff)
downloadEpisodeBrowser-ff53b8efce55f5668af61f13b656fdb54dee7755.tar.gz
Check Windows API calls for errors more consistently.
Some of the checks are likely redundant, but the Windows API documentation rarely makes it clear WHICH errors may be returned (and under which circumstances) rather than simply WHETHER errors may be returned (under any circumstances, including those that do not apply in the given case).
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index c08e6f8..e70cc06 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -90,7 +90,7 @@ LRESULT EpisodeListView::HandleNotify(const LPARAM lParam)
{
extern HFONT g_hfBold;
if (!Pl("track_episodes","watched",pLvCd->nmcd.lItemlParam)) {
- SelectObject(pLvCd->nmcd.hdc, g_hfBold);
+ throw_nil<SelectObject>(pLvCd->nmcd.hdc, g_hfBold);
return CDRF_NEWFONT;
}
break;
@@ -125,9 +125,9 @@ LRESULT EpisodeListView::HandleNotify(const LPARAM lParam)
{
extern HMENU g_hPopupMenu;
const DWORD dwPos = GetMessagePos();
- TrackPopupMenu(g_hPopupMenu, TPM_RIGHTBUTTON,
+ throw_nil<TrackPopupMenu>(g_hPopupMenu, TPM_RIGHTBUTTON,
LOWORD(dwPos), HIWORD(dwPos), 0,
- m_hWndParent, NULL);
+ m_hWndParent, (const RECT*)NULL);
break;
}
}