We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a029fe commit e656f75Copy full SHA for e656f75
elfio/elfio.hpp
@@ -138,8 +138,12 @@ class elfio
138
bool load( const std::string& file_name, bool is_lazy = false )
139
{
140
pstream = std::make_unique<std::ifstream>();
141
+ if ( !pstream ) {
142
+ return false;
143
+ }
144
+
145
pstream->open( file_name.c_str(), std::ios::in | std::ios::binary );
- if ( pstream == nullptr || !*pstream ) {
146
+ if ( !*pstream ) {
147
return false;
148
}
149
0 commit comments