diff --git a/qrenderdoc/Code/qprocessinfo.cpp b/qrenderdoc/Code/qprocessinfo.cpp index c352dc912..d6b867b0e 100644 --- a/qrenderdoc/Code/qprocessinfo.cpp +++ b/qrenderdoc/Code/qprocessinfo.cpp @@ -26,12 +26,12 @@ struct callbackContext callbackContext(QProcessList &l) : list(l) {} QProcessList &list; - PFN_GETWINDOWTHREADPROCESSID GetWindowThreadProcessId; - PFN_GETWINDOW GetWindow; - PFN_ISWINDOWVISIBLE IsWindowVisible; - PFN_GETWINDOWTEXTLENGTHW GetWindowTextLengthW; - PFN_GETWINDOWTEXTW GetWindowTextW; - PFN_ENUMWINDOWS EnumWindows; + PFN_GETWINDOWTHREADPROCESSID GetWindowThreadProcessId = NULL; + PFN_GETWINDOW GetWindow = NULL; + PFN_ISWINDOWVISIBLE IsWindowVisible = NULL; + PFN_GETWINDOWTEXTLENGTHW GetWindowTextLengthW = NULL; + PFN_GETWINDOWTEXTW GetWindowTextW = NULL; + PFN_ENUMWINDOWS EnumWindows = NULL; }; }; @@ -345,6 +345,11 @@ QProcessList QProcessInfo::enumerate() #endif +QProcessInfo::QProcessInfo() +{ + m_pid = 0; +} + uint32_t QProcessInfo::pid() const { return m_pid; diff --git a/qrenderdoc/Code/qprocessinfo.h b/qrenderdoc/Code/qprocessinfo.h index af2b1341c..1ba7f47c2 100644 --- a/qrenderdoc/Code/qprocessinfo.h +++ b/qrenderdoc/Code/qprocessinfo.h @@ -14,6 +14,8 @@ typedef QList QProcessList; class QProcessInfo { public: + QProcessInfo(); + static QProcessList enumerate(); uint32_t pid() const;