]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/http.cpp
pass correct tool id (and not always -1) to EVT_TOOL_RCLICKED() handler
[wxWidgets.git] / src / common / http.cpp
index d65d37f9cb7b7c6b5d66e512bf50da8dcf1b0a31..bea35a2335963372292749c054322afe58671b51 100644 (file)
 
 #include <stdio.h>
 #include <stdlib.h>
+
+#ifndef WX_PRECOMP
 #include "wx/string.h"
+#include "wx/app.h"
+#endif
+
 #include "wx/tokenzr.h"
 #include "wx/socket.h"
 #include "wx/protocol/protocol.h"
@@ -234,9 +239,8 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
   SaveState();
 
   // we may use non blocking sockets only if we can dispatch events from them
-  SetFlags( wxIsMainThread() && (wxTheApp && wxTheApp->IsMainLoopRunning())
-                ? wxSOCKET_NONE
-                : wxSOCKET_BLOCK );
+  SetFlags( wxIsMainThread() && wxApp::IsMainLoopRunning() ? wxSOCKET_NONE
+                                                           : wxSOCKET_BLOCK );
   Notify(false);
 
   wxString buf;