linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yordan Karadzhov <y.karadz@gmail.com>
To: Mircea Cirjaliu <mircea.cirjaliu@yahoo.com>,
	linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH] kernelshark: make sure ksmodels index is valid before use
Date: Sun, 19 Oct 2025 17:48:22 +0300	[thread overview]
Message-ID: <29dc77fc-d7e1-661f-dda2-f3d4ecd11f3a@gmail.com> (raw)
In-Reply-To: <51e122b0-8154-4e41-99ba-996ff42e5e98@yahoo.com>

The patch is applied. Thanks!

Yordan

On 10/13/25 23:07, Mircea Cirjaliu wrote:
> 
> Pressing Ctrl+C with no data loaded will lead to a crash.
> Steps to reproduce:
> Click in the trace viewer window.
> Press Ctrl+C.
> 
> Signed-off-by: Mircea Cirjaliu <mircea.cirjaliu@yahoo.com>
> ---
>   src/KsModels.cpp | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/KsModels.cpp b/src/KsModels.cpp
> index c8a6ba3..cf4cfe9 100644
> --- a/src/KsModels.cpp
> +++ b/src/KsModels.cpp
> @@ -309,7 +309,8 @@ QVariant KsViewModel::data(const QModelIndex &index, int role) const
>   	}
>   
>   	if (role == Qt::DisplayRole)
> -		return this->getValue(index.column(), index.row());
> +		if (index.isValid())
> +			return this->getValue(index.column(), index.row());
>   
>   	return {};
>   }

  reply	other threads:[~2025-10-19 14:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51e122b0-8154-4e41-99ba-996ff42e5e98.ref@yahoo.com>
2025-10-13 20:07 ` [PATCH] kernelshark: make sure ksmodels index is valid before use Mircea Cirjaliu
2025-10-19 14:48   ` Yordan Karadzhov [this message]
     [not found] <2a04a19a-5c3c-4724-862a-26fae85638dd.ref@yahoo.com>
2025-10-11 11:45 ` Mircea Cirjaliu
2025-10-12 19:42   ` Yordan Karadzhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29dc77fc-d7e1-661f-dda2-f3d4ecd11f3a@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=mircea.cirjaliu@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).