removed potential memory deref errors
git-svn-id: svn://10.0.0.236/trunk@39858 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -99,7 +99,9 @@ protected:
|
||||
nsresult NS_NewRobotSink(nsIRobotSink** aInstancePtrResult)
|
||||
{
|
||||
RobotSink* it = new RobotSink();
|
||||
return it->QueryInterface(kIRobotSinkIID, (void**) aInstancePtrResult);
|
||||
if(it)
|
||||
return it->QueryInterface(kIRobotSinkIID, (void**) aInstancePtrResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
RobotSink::RobotSink()
|
||||
|
||||
@@ -16,9 +16,11 @@ extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIWebShell * ww);
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
nsVoidArray * gWorkList = new nsVoidArray();
|
||||
int i;
|
||||
for (i = 1; i < argc; i++) {
|
||||
gWorkList->AppendElement(new nsString(argv[i]));
|
||||
if(gWorkList) {
|
||||
int i;
|
||||
for (i = 1; i < argc; i++) {
|
||||
gWorkList->AppendElement(new nsString(argv[i]));
|
||||
}
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kCParserCID, NS_PARSER_IID);
|
||||
|
||||
Reference in New Issue
Block a user