Browse Source

Fix crash in the apt-transport-https when Owner is NULL

Do not crash in ServerState::HeaderLine if there is no Owner.

Closes: #778375
Tomasz Buchert 11 years ago
parent
commit
0c2dc43d4f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      methods/server.cc

+ 1 - 1
methods/server.cc

@@ -129,7 +129,7 @@ bool ServerState::HeaderLine(string Line)
 	 if (elements == 3)
 	 {
 	    Code[0] = '\0';
-	    if (Owner->Debug == true)
+	    if (Owner != NULL && Owner->Debug == true)
 	       clog << "HTTP server doesn't give Reason-Phrase for " << Result << std::endl;
 	 }
 	 else if (elements != 4)