From fdcea011000710fc5ed71c8e43726896f1f9906f Mon Sep 17 00:00:00 2001 From: naiiawah Date: Thu, 5 Jan 2012 02:10:05 -0700 Subject: [PATCH] numberOfDevices could be left unitialized if sendData or receiveData fail in findDevices or if no one ever calls findDevices. Added init of var. --- ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp b/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp index 961103d22..f30fca1b5 100644 --- a/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp @@ -37,6 +37,7 @@ DFUObject::DFUObject(bool _debug,bool _use_serial,QString portname): debug(_debug),use_serial(_use_serial),mready(true) { info = NULL; + numberOfDevices = 0; qRegisterMetaType("Status");