-
Notifications
You must be signed in to change notification settings - Fork 228
verify if some objects are null #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1153,7 +1153,7 @@ void CKnownFile::CreateOfferedFilePacket( | |
| tags.push_back(new CTagInt32(FT_FILESIZE_HI, (uint32)(GetFileSize() >> 32))); | ||
| } | ||
| } else { | ||
| if (!pClient->SupportsLargeFiles()) { | ||
| if (pClient && (!pClient->SupportsLargeFiles())) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| wxFAIL; | ||
| tags.push_back(new CTagInt32(FT_FILESIZE, 0)); | ||
| } else { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -745,7 +745,7 @@ void CSharedFileList::SendListToServer(){ | |
| // - this function is called once when connecting to a server and when a file becomes shareable - so, it's called rarely. | ||
| // - if the compressed size is still >= the original size, we send the uncompressed packet | ||
| // therefor we always try to compress the packet | ||
| if (server->GetTCPFlags() & SRV_TCPFLG_COMPRESSION){ | ||
| if (server && (server->GetTCPFlags() & SRV_TCPFLG_COMPRESSION)){ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First of all, this function should only be called when we're connected to a server. But just in case, if we are not connected (i.e. |
||
| packet->PackPacket(); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation for
rl_completion_matchessays that entry_func (i.e.command_completion()in this case) will first be called with state being zero on the first call, and non-zero on subsequent calls. ThuscurCommands(andnextCommand, too) will always be initialized and non-zero on calls where state is non-zero.