summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/clist/clistmenus.cpp8
-rw-r--r--src/modules/netlib/netlib.cpp3
2 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index 1ae87be532..6ca756072f 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -142,13 +142,9 @@ typedef struct _MenuItemHandles
void FreeMenuProtos(void)
{
- int i;
-
if (cli.menuProtos) {
- for (i=0; i < cli.menuProtoCount; i++)
- if (cli.menuProtos[i].szProto)
- mir_free(cli.menuProtos[i].szProto);
-
+ for (int i=0; i < cli.menuProtoCount; i++)
+ mir_free(cli.menuProtos[i].szProto);
mir_free(cli.menuProtos);
cli.menuProtos = NULL;
}
diff --git a/src/modules/netlib/netlib.cpp b/src/modules/netlib/netlib.cpp
index b6deb4aef6..58cd922864 100644
--- a/src/modules/netlib/netlib.cpp
+++ b/src/modules/netlib/netlib.cpp
@@ -248,6 +248,9 @@ void NetlibDoClose(NetlibConnection *nlc, bool noShutdown)
INT_PTR NetlibCloseHandle(WPARAM wParam, LPARAM)
{
+ if (wParam == NULL)
+ return 0;
+
switch(GetNetlibHandleType((void*)wParam)) {
case NLH_USER:
{