context menu interface pointer cleanup
Modified: trunk/reactos/subsys/system/explorer/desktop/desktop.cpp
Modified: trunk/reactos/subsys/system/explorer/utility/shellclasses.cpp

Modified: trunk/reactos/subsys/system/explorer/desktop/desktop.cpp
--- trunk/reactos/subsys/system/explorer/desktop/desktop.cpp	2005-05-03 08:01:18 UTC (rev 14953)
+++ trunk/reactos/subsys/system/explorer/desktop/desktop.cpp	2005-05-03 08:03:46 UTC (rev 14954)
@@ -643,7 +643,8 @@
 
 				  hr = pcm->InvokeCommand(&cmi);
 				}
-			}
+			} else
+				_cm_ifs.reset();
 		}
 
 		pcm->Release();

Modified: trunk/reactos/subsys/system/explorer/utility/shellclasses.cpp
--- trunk/reactos/subsys/system/explorer/utility/shellclasses.cpp	2005-05-03 08:01:18 UTC (rev 14953)
+++ trunk/reactos/subsys/system/explorer/utility/shellclasses.cpp	2005-05-03 08:03:46 UTC (rev 14954)
@@ -509,7 +509,7 @@
 		_pctxmenu3 = (LPCONTEXTMENU3)pcm;
 	else
 #endif
-	if (pcm1->QueryInterface (IID_IContextMenu2, (void**)&pcm) == NOERROR)
+	if (pcm1->QueryInterface(IID_IContextMenu2, (void**)&pcm) == NOERROR)
 		_pctxmenu2 = (LPCONTEXTMENU2)pcm;
 
 	if (pcm) {
@@ -556,7 +556,8 @@
 
 				  hr = pcm->InvokeCommand(&cmi);
 				}
-			}
+			} else
+				cm_ifs.reset();
 		}
 
 		pcm->Release();