Skip to content

Commit 0689e56

Browse files
authored
Fixed warnings found with static analysis tool (#373)
Fixed warnings: * not initialized database_ pointer * dereference without checking null
1 parent 2babdde commit 0689e56

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/sqflite/tizen/src/database_manager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class DatabaseManager {
2727
: path_(path),
2828
database_id_(database_id),
2929
single_instance_(single_instance),
30-
log_level_(log_level){};
30+
log_level_(log_level),
31+
database_(nullptr){};
3132
virtual ~DatabaseManager();
3233

3334
inline const std::string path() { return path_; };

packages/webview_flutter/tizen/src/webview.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ void WebView::InitWebView() {
831831
void WebView::HandleMethodCall(
832832
const flutter::MethodCall<flutter::EncodableValue>& method_call,
833833
std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result) {
834-
if (!webview_instance_) {
834+
if (!webview_instance_ || !method_call.arguments()) {
835835
return;
836836
}
837837
const auto method_name = method_call.method_name();

0 commit comments

Comments
 (0)