Skip to content

Commit

Permalink
Prevent segfault on copying ResultRange.
Browse files Browse the repository at this point in the history
  • Loading branch information
schveiguy authored Jun 29, 2017
1 parent 76a4fe7 commit 477636a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/mysql/result.d
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public:
/// Check whether the range can still we used, or has been invalidated
@property bool isValid() const pure nothrow
{
return _commandID == _con.lastCommandID;
return _con !is null && _commandID == _con.lastCommandID;
}

/// Make the ResultRange behave as an input range - empty
Expand Down

0 comments on commit 477636a

Please sign in to comment.